[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

    scrollsmash

    @captainawesome7 Is it at all possible to make this use SQLite via the lib folder? I dont know what else to think of because I have other plugins that use SQLite and run fine, but this one cannot to connect to SQLite for some reason ever since I moved my server to the Linux Box. Sorry to keep pestering you about this but I really want to implement this onto my server and others are obviously having the same issue ;)
     
  3. Offline

    captainawesome7

    No. All you do is drag the .jar into your plugins folder.
    I'm done with this. There is no SQLite connector, SQL is included in Java6. I'm not implementing an unnecessary connecting .jar for no reason.
     
  4. Offline

    scrollsmash

    Calm down mate Im asking because yours is the ONLY one that wont connect to SQLite, and Im no programmer so I dont know if its the way other plugins are connecting or what, but I have other plugins using SQLite and they work fine.
     
  5. Offline

    ScorchRaserik

    When using the Spout client, can you customize the icon for the "Achievement Get"?
     
  6. Looks awsome. Downloading now :)
     
  7. Offline

    astinax

    the plugin doesn't load it says
    Code:
    2011-08-25 18:27:14 [SEVERE] Could not load 'plugins\Achievement.jar' in folder 'plugins':
    unacceptable character #FFFD special characters are not allowed
    in "<reader>", position 64
    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:213)
    at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:136)
    at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:143)
    at org.bukkit.craftbukkit.CraftServer.<init>(CraftServer.java:110)
    at net.minecraft.server.ServerConfigurationManager.<init>(ServerConfigurationManager.java:51)
    at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:133)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:337)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    
     
  8. Offline

    captainawesome7

    What does you config look like?
     
  9. Offline

    astinax

    here is config file (messages in french)
    Code:
    Breaks:
        stone:
            '1':
                Message: Ta première cobble!
    Kills:
        zombie:
            '1':
                Message: Tuer tous les ZOMBIES!
    Places:
        redstone:
            '1':
                Message: Tu veux devenir électricien?!
        dirt:
            '100':
                Message: 100 bloc de BOUSE!
        cobblestone:
            '100'
                Message: La cobble c'est bon, mangez-en!
        brick block
            '1'
                Message: Trop classe, de la brique!
    Crafts:
        torch:
            '1':
                Message: Que la lumière soit!
    
     
  10. Offline

    captainawesome7

    @astinax I'm guessing your problem is é.
     
  11. Offline

    astinax

    stilll not workinng now it says
    Code:
    2011-08-26 04:01:09 [SEVERE] Could not load 'plugins\Achievement.jar' in folder 'plugins':
    while parsing a block mapping
    in "<reader>", line 10, column 5:
    redstone:
    ^
    expected <block end>, but found BlockMappingStart
    in "<reader>", line 18, column 13:
    Message: La cobble c'est bon, ma ...
    ^
    
    at org.yaml.snakeyaml.parser.ParserImpl$ParseBlockMappingKey.produce(ParserImpl.java:576)
    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.composeMappingNode(Composer.java:228)
    at org.yaml.snakeyaml.composer.Composer.composeNode(Composer.java:160)
    at org.yaml.snakeyaml.composer.Composer.composeMappingNode(Composer.java:230)
    at org.yaml.snakeyaml.composer.Composer.composeNode(Composer.java:160)
    at org.yaml.snakeyaml.composer.Composer.composeDocument(Composer.java:122)
    at org.yaml.snakeyaml.composer.Composer.getSingleNode(Composer.java:105)
    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:213)
    at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:136)
    at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:143)
    at org.bukkit.craftbukkit.CraftServer.<init>(CraftServer.java:110)
    at net.minecraft.server.ServerConfigurationManager.<init>(ServerConfigurationManager.java:51)
    at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:133)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:337)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
     
  12. Offline

    Danton1983

    anyone have a cool config file I can steal.. I mean use?
     
  13. Offline

    darkcammo

    i set plugin to give achievement after killing 10 zombies and it gives it after killing 3.
    console gives error
    Show Spoiler

    22:51:24 [SEVERE] Could not pass event ENTITY_DAMAGE to Achievement
    java.lang.NullPointerException
    at org.bukkit.inventory.ItemStack.setType(ItemStack.java:70)
    at me.ic3d.achievement.Achievement.getItemReward(Achievement.java:278)
    at me.ic3d.achievement.AEL.onEntityDamageByEntity(AEL.java:87)
    at me.ic3d.achievement.AEL.onEntityDamage(AEL.java:103)
    at org.bukkit.plugin.java.JavaPluginLoader$59.execute(JavaPluginLoader.j
    ava:656)
    at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.jav
    a:58)
    at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.j
    ava:338)
    at net.minecraft.server.EntityHuman.d(EntityHuman.java:555)
    at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:883)
    at net.minecraft.server.Packet7UseEntity.a(SourceFile:33)
    at net.minecraft.server.NetworkManager.b(NetworkManager.java:226)
    at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:89)
    at org.getspout.spout.SpoutNetServerHandler.a(SpoutNetServerHandler.java
    :436)
    at net.minecraft.server.NetworkListenThread.a(SourceFile:105)
    at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:454)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:363)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)

    using 1060 and spout
    also : the config file does not want me to remove any achievments it auto generates... there should be a way to do this
     
  14. Offline

    EMOberger

    @captainnawesome7
    There was a mention of some kind of display or menu for achievements?
    any word on that? any plans or anything?
     
  15. Offline

    IC3D

    Re-download for a fix
     
  16. Offline

    Comp_uter15776

    Are we able to get it so there's a hook for commands? like idk, /fly

    Achievement Get! Fly like a butterfly...

    Just my 2 cents
     
  17. Offline

    Rowanzy

    Nice idea for you using spout make a menu if you press a letter (should be configurable) will show the done acheivements and the able to get acheivements this will be really nice anf will improve this plugin ALOT but i really like it please pm me if you chose to
     
  18. Offline

    Baalthorun

    Can you add a method to get a archievment when a player reach a specific point? Like "You arrive the peak of the highest Mointain".

    Sry for my english!
     
  19. Offline

    captainawesome7

    Sure, in the next update.
     
  20. Offline

    Master666

    need help: trying to make an achievement with item name that has spaces. I tried to write "diamond sword" and "diamond_sword" but neither work. but I change it to "furnace" and it work. please help me

    Edit: NVM I just forgot to put ":" after the diamond _sword

    Edit 2: here is some suggestion for some next update:
    walk ( in special block and count as one block each "...")
    threw = thrown item by pressing "Q"
    collect = collected item
    Smelt = Smelted item and another one for the fuel.
    eat = eat some item
     
  21. Offline

    gameswereus

    I put the .jar in the plugins folder and reloaded the plugins. The problem is I don't see any folder for it.
     
  22. Offline

    captainawesome7

    Any errors in the console?
     
  23. Offline

    gameswereus

    Nope. Does it work with RB 1060? Maybe that's the problem.
     
  24. Offline

    captainawesome7

    Yeah it works with RB 1060. If no folder is created there would be an error in the console. Does it say "achievement enabled" or whatever?
     
  25. Offline

    gameswereus

    Whoops I found what was wrong I think

    Achievement: 3co not found.
     
  26. Offline

    captainawesome7

    You don't need 3co or iConomy to use the plugin.
     
  27. Offline

    gameswereus

    That's the only thing I get when I reload. It does say it's being disabled to.
     
  28. Offline

    captainawesome7

    And no folder is being created?
     
  29. Offline

    gameswereus

    No
     
  30. Offline

    loothelion

    Hey is there any reason why I can't seem to get the small popup in the top of the screen to work. I'm running the latest version of Spout and SpoutCraft?
     
  31. Offline

    Arton

    Could you maby do so you could get a achievement by using a command ? and im getting this erro then im trying it

    Code:
    [SEVERE] Could not load 'plugins\Achievement.jar' in folder 'plugins': Spout
    org.bukkit.plugin.UnknownDependencyException: Spout
        at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:133)
        at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:213)
        at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:136)
        at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:143)
        at org.bukkit.craftbukkit.CraftServer.<init>(CraftServer.java:110)
        at net.minecraft.server.ServerConfigurationManager.<init>(ServerConfigurationManager.java:51)
        at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:133)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:337)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
     

Share This Page