[INACTIVE][FUN/ECON] Achievement v1.3 - Custom Minecraft Achievements [1000]

Discussion in 'Inactive/Unsupported Plugins' started by IC3D, Jun 27, 2011.

  1. Offline

    IC3D

    Achievement: A simple achievement plugin!
    Version: 1.3
    If you want help, tag @captainawesome7 , not IC3D!
    This is a super simple plugin. It is a somewhat easy to configure achievement plugin that takes advantage of Spout to make it look real. To see the Achievement Get notifications, you have to have the Spout server mod and client mod installed. It keeps track of kills, places, crafting, and breaks with an SQLite database, so there is no MySQL setup required.

    Requirements:
    Features:
    • Configurable Achievements!
    • Uses breaks, placements, kills, and crafting config options to award achievements!
    Configuration:
    config (open)

    The configuration is where all the magic happens. Here you can add as may achievements as you want! The default config.yml looks like this:
    Code:
    Breaks:
        stone:
            '1':
                Message: Your first cobble!
    Kills:
        zombie:
            '1':
                Reward:
                    Item:
                        Amount: 1
                        Type: stone
                    Money:
                        Amount: 1
                Message: Your first zombie!
    Places:
        stone:
            '1':
                Message: Your first stone smelt!
    Crafts:
        torch:
            '1':
                Reward:
                    Money:
                        Amount: 5
                Message: Light it up!
    
    The breaks and places format is as follows:
    Code:
    Breaks/Places:
        itemname:
            'amountToTrigger':
                Reward:
                    Item:
                        Amount: amountofItem
                        Type: itemName
                    Money:
                        Amount: moneyAmount (3co Only)
                Message: Your message here
    You don't have to include the reward section, and can omit item or money as you see fit. An example is:
    Code:
    Places:
        dirt:
            '100':
                Message: You dirty gurl!
    The above will send me the achievement notification You dirty Gurl! when I place 100 dirt.
    Note: The crafting achievements are per time crafted, not the amount. So the code already included will give the achievement regardless of the number of torches made, it is per itemstack crafted.

    Video Demo:
    Video (open)



    Downloads
    The source code is included in the .jar

    Planned Changes:
    • Add more hooks
    Changelog:
    Version 1.3
    • Hidden fix to try to address the Driver not found errors.
    Version 1.3
    • Updated to work with Spout
    Version 1.2
    • Fixed the nullpointerexception when crafting items. (I think it was actually a but of BukkitContrib, I'm pretty sure it sent a new event when somebody clicked on the result box, and not just when an item was actually crafted)
    • Fixed the database path not working (unconfirmed, tested on a mac with file.separator, in theory it should work for Windows users as well)
    • Added iConomy Support (Untested)
    • Added messages for hooking into 3co and iConomy in the console (when enabling)
    Version 1.1
    • Added crafting achievements
    Version 1.0
    • Official Release
    Credits:
     
  2. Offline

    captainawesome7

    I need you to post the entire error then.
     
  3. Offline

    Paradox256

    The error in my previous posts is the entire error.

    But, for reference:

    Code:
    [Achievement] Test query failed! Report the following error to captainawesome7:
    2011-07-11 19:19:29
    [SEVERE] java.sql.SQLException: No suitable driver found for jdbc:sqlite:C:\Users\Bub the Dub\Downloads\Games\Minecraft\Bukkit\plugins\Achievement/achievements.db
    2011-07-11 19:19:29
    [SEVERE]     at java.sql.DriverManager.getConnection(Unknown Source)
    2011-07-11 19:19:29
    [SEVERE]     at java.sql.DriverManager.getConnection(Unknown Source)
    2011-07-11 19:19:29
     [SEVERE]     at me.ic3d.achievement.Achievement.onEnable(Achievement.java:77)
    2011-07-11 19:19:29
    [SEVERE]     at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:126)
    2011-07-11 19:19:29
    [SEVERE]     at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:864)
    2011-07-11 19:19:29
    [SEVERE]     at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:264)
    2011-07-11 19:19:29
    [SEVERE]     at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:151)
    2011-07-11 19:19:29
    [SEVERE]     at org.bukkit.craftbukkit.CraftServer.enablePlugins(CraftServer.java:136)
    2011-07-11 19:19:29
    [SEVERE]     at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:284)
    2011-07-11 19:19:29
    [SEVERE]     at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:271)
    2011-07-11 19:19:29
    [SEVERE]     at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:148)
    2011-07-11 19:19:29
    [SEVERE]     at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:335)
    2011-07-11 19:19:29
    [SEVERE]     at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    2011-07-11 19:19:29
     
  4. Offline

    captainawesome7

    Sorry I'm feeling a bit retarded today. And XenForo just screwed with a different thread so I wasn't in a good mood. Anyways, it seems as though there is no SQL driver found. I don't really know anything about it, as I had my dad help me with the SQL syntax and whatnot when writing this plugin(he codes PHP and uses MySQL all the time), but I would guess you don't have SQLite installed. If you do, I really don't know what the error could be.
     
  5. Offline

    Paradox256

    Hm, maybe. I know that I just installed the Player editor which uses SQLite, and that worked fine. Not sure though. I'll look into this for a bit.
     
  6. Offline

    captainawesome7

    I think i found the problem, give me a minute.
     
  7. Offline

    Paradox256

    Alright, well, I'm waiting. In the mean time I guess I could try it one more time just because.

    I actually got it to work myself. Thanks for trying and I hope I didn't waste all of your time >.>

    One thing, though. Can I get a list of all the mobs and blocks etc. to use in this mod? So far, things I've tried like "sponge" and "diamond", even the default "zombie" works, but I tried "creeper", "spider", "skeleton", and "squid" and neither of those worked.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 17, 2016
  8. Offline

    captainawesome7

    Its CreatureType's to lower case, and Material.name().toLowerCase().
    Im going to fix whatever mobs dont work in the next version
     
  9. Offline

    Paradox256

    I don't understand what you mean by the first bit :p But now that I've gotten this to work, the next version will be something to wait for, then.
     
  10. Offline

    cheezyandweezy

    yo can you please make it work with iConomy, or is it already working with it and I'm just out of it.
     
  11. Offline

    captainawesome7

    I forgot about updating it, I'll do it soon.
     
  12. Offline

    weresdrim

    I can't get it working I tested out this config:

    Breaks:
    stone:
    '1':
    Message: Your first cobble!
    dirt:
    '100':
    Reward:
    Item:
    Amount: 1
    Type: Iron Shovel
    Message: Getting down and Dirty!
    Kills:
    zombie:
    '1':
    Reward:
    Item:
    Amount: 1
    Type: Iron Sword
    Money:
    Amount: 1
    Message: Did you get his head?!
    creeper:
    '1':
    Reward:
    Item:
    Amount: 5
    Type: Arrow
    Message: SSSSSsssss… Oh no, Phew 0.o
    Places:
    stone:
    '1':
    Message: Don't like cobblestone?
    Portal:
    '1':
    Message: Highway to hell
    Crafts:
    torch:
    '1':
    Reward:
    Money:
    Amount: 5
    Message: Light it up!

    And then I log on to my server and there aren't any achievements popping up
    WHATS WRONG WITH IT!!!
     
  13. Offline

    captainawesome7

    @weresdrim
    Use the code tag, that YML included was worthless w/out indentation.
    I need to know more details than that to fix any problems. Is achievements.db showing up in /plugins/Achievements/?
    Do you have the BukkitContrib client mod and server plugin installed?
    Are the achievements popping via server chat?
     
  14. Offline

    cheezyandweezy

    Thanks!! I hope I don't seem to pushy, but, when do you think you will?
     
  15. Offline

    philipborg

    How did you fix it? Have the same problem...
     
  16. Offline

    Carbondani

    captainawesome7 please help me :
    i get these lines of error everytime i start my bukkit server
    and because of this the whole plugin doesn't work

    11:42:18 [SEVERE] java.sql.SQLException: No suitable driver found for jdbc:sqlit
    e:C:\Users\Felhasznßlˇ\Desktop\Minecraft Server\1\plugins\Achievement/achievemen
    ts.db
    11:42:18 [SEVERE] at java.sql.DriverManager.getConnection(Unknown Source)
    11:42:18 [SEVERE] at java.sql.DriverManager.getConnection(Unknown Source)
    11:42:18 [SEVERE] at me.ic3d.achievement.Achievement.onEnable(Achievement.
    java:77)
    11:42:18 [SEVERE] at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlug
    in.java:126)
    11:42:18 [SEVERE] at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(
    JavaPluginLoader.java:857)
    11:42:18 [SEVERE] at org.bukkit.plugin.SimplePluginManager.enablePlugin(Si
    mplePluginManager.java:264)
    11:42:18 [SEVERE] at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftSe
    rver.java:151)
    11:42:18 [SEVERE] at org.bukkit.craftbukkit.CraftServer.enablePlugins(Craf
    tServer.java:136)
    11:42:18 [SEVERE] at net.minecraft.server.MinecraftServer.e(MinecraftServe
    r.java:284)
    11:42:18 [SEVERE] at net.minecraft.server.MinecraftServer.a(MinecraftServe
    r.java:271)
    11:42:18 [SEVERE] at net.minecraft.server.MinecraftServer.init(MinecraftSe
    rver.java:148)
    11:42:18 [SEVERE] at net.minecraft.server.MinecraftServer.run(MinecraftSer
    ver.java:335)
    11:42:18 [SEVERE] at net.minecraft.server.ThreadServerApplication.run(Sour
    ceFile:422)

    I am using java version 6 and bukkit version 953.
    so please Help me ! :(


     
  17. Offline

    CainFoool

    It's kind of obvious what the problem is,
    :C:\Users\Felhasznßlˇ\Desktop\Minecraft Server\1\plugins\Achievement"/"achievemen
    ts.db

    That is the wrong type of /, all you gotta do is modify it so it's \

    :)

    @captainawesome7
     
  18. Offline

    captainawesome7

    I'm going to change it to system.getProp("file.separator") or whatever that system property is.
     
  19. Offline

    mario00037

    Everytime I start the server this error pops up.

    Code:
    Could not load 'plugins/Achievement.jar' in folder 'plugins':
    unacceptable character #FFFD special characters are not allowed
    in "<reader>", position 473
        at org.yaml.snakeyaml.reader.StreamReader.checkPrintable(StreamReader.java:68)
        at org.yaml.snakeyaml.reader.StreamReader.update(StreamReader.java:159)
        at org.yaml.snakeyaml.reader.StreamReader.peek(StreamReader.java:117)
        at org.yaml.snakeyaml.reader.StreamReader.peek(StreamReader.java:106)
        at org.yaml.snakeyaml.scanner.ScannerImpl.scanToNextToken(ScannerImpl.java:964)
        at org.yaml.snakeyaml.scanner.ScannerImpl.fetchMoreTokens(ScannerImpl.java:237)
        at org.yaml.snakeyaml.scanner.ScannerImpl.checkToken(ScannerImpl.java:183)
        at org.yaml.snakeyaml.parser.ParserImpl$ParseImplicitDocumentStart.produce(ParserImpl.java:200)
        at org.yaml.snakeyaml.parser.ParserImpl.peekEvent(ParserImpl.java:163)
        at org.yaml.snakeyaml.parser.ParserImpl.checkEvent(ParserImpl.java:148)
        at org.yaml.snakeyaml.composer.Composer.getSingleNode(Composer.java:104)
        at org.yaml.snakeyaml.constructor.BaseConstructor.getSingleData(BaseConstructor.java:124)
        at org.yaml.snakeyaml.Yaml.load(Yaml.java:264)
        at org.bukkit.util.config.Configuration.load(Configuration.java:82)
        at org.bukkit.plugin.java.JavaPlugin.initialize(JavaPlugin.java:157)
        at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:175)
        at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:199)
        at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:122)
        at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:118)
        at org.bukkit.craftbukkit.CraftServer.reload(CraftServer.java:356)
        at org.bukkit.command.SimpleCommandMap$ReloadCommand.execute(SimpleCommandMap.java:281)
        at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:129)
        at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:290)
        at net.minecraft.server.MinecraftServer.b(MinecraftServer.java:480)
        at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:465)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:361)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    Heres the Config Im trying to use http://pastie.org/2216160

    If I am typing the Config incorrect can someone please fix it for me?
     
  20. Offline

    captainawesome7

    You can't use apostrophes. Use two instead like Don''t
    Message: Don't you hate it to.

     
  21. Offline

    mario00037

    Thanks for the quick reply but I'm still getting the same Error. Heres the updated config. http://pastie.org/2216208
    If you wouldn't mind. Can you please fix the wording for me?
     
  22. Offline

    captainawesome7

    Message: Should've used Sheres
    right there
     
  23. Offline

    mario00037

    DAMIT!!!! I removed all the ' from the config, but not the ones from the numbers on top of the messages. And the error is STILL THERE!!!:mad: Here is the Latest edit. http://pastie.org/2216213 WTF AM I DOING WRONG!!!!!!
     
  24. Offline

    captainawesome7

    well first off the item names in the config have to be lower case, but post the error again please
     
  25. Offline

    mario00037

    WELL... HERE YOU GO.

    Code:
    Could not load 'plugins/Achievement.jar' in folder 'plugins':
    unacceptable character #FFFD special characters are not allowed
    in "<reader>", position 474
        at org.yaml.snakeyaml.reader.StreamReader.checkPrintable(StreamReader.java:68)
        at org.yaml.snakeyaml.reader.StreamReader.update(StreamReader.java:159)
        at org.yaml.snakeyaml.reader.StreamReader.peek(StreamReader.java:117)
        at org.yaml.snakeyaml.reader.StreamReader.peek(StreamReader.java:106)
        at org.yaml.snakeyaml.scanner.ScannerImpl.scanToNextToken(ScannerImpl.java:964)
        at org.yaml.snakeyaml.scanner.ScannerImpl.fetchMoreTokens(ScannerImpl.java:237)
        at org.yaml.snakeyaml.scanner.ScannerImpl.checkToken(ScannerImpl.java:183)
        at org.yaml.snakeyaml.parser.ParserImpl$ParseImplicitDocumentStart.produce(ParserImpl.java:200)
        at org.yaml.snakeyaml.parser.ParserImpl.peekEvent(ParserImpl.java:163)
        at org.yaml.snakeyaml.parser.ParserImpl.checkEvent(ParserImpl.java:148)
        at org.yaml.snakeyaml.composer.Composer.getSingleNode(Composer.java:104)
        at org.yaml.snakeyaml.constructor.BaseConstructor.getSingleData(BaseConstructor.java:124)
        at org.yaml.snakeyaml.Yaml.load(Yaml.java:264)
        at org.bukkit.util.config.Configuration.load(Configuration.java:82)
        at org.bukkit.plugin.java.JavaPlugin.initialize(JavaPlugin.java:157)
        at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:175)
        at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:199)
        at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:122)
        at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:118)
        at org.bukkit.craftbukkit.CraftServer.<init>(CraftServer.java:89)
        at net.minecraft.server.ServerConfigurationManager.<init>(ServerConfigurationManager.java:51)
        at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:132)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:335)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    
    http://pastie.org/2216285
     
  26. Offline

    captainawesome7

    Well idfk what your problem is does the default config.yml work?
     
  27. Offline

    mario00037

    Yes
     
  28. Offline

    captainawesome7

    So its something you did to your config. Did you use tabs instead of spaces?
     
  29. Offline

    mario00037

    I found out what the problem was. On my mac when i type ... it converts it to something different so I only put 2 period's
     
  30. Offline

    Adelion

    @IC3D

    Great plugin.
    Thanks you
     
  31. Offline

    Adelion

    Hi, I get same error as mario00037. I realized plugin doesn't accept accenting (which I use a lot in my language). Now, Achievement works fine.
    But, when I write in config: for example:
    Breaks:
    dirt:
    '1'
    Message: bla bla bla
    dirt:
    '20'
    Message: bli bli bli

    ...The first achievement disappears, only the one with the highest value to get it stays.

    So my question is : can't we have more than one achievement per category ?

    (Maybe I'm doing something wrong...?)
     

Share This Page