[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

    Add one after dirt, like so:
    Code:
        gold_ore:
            '1':
                Message: BUTTER!!!
            '4':
                Message: BUTTER!!!
     
  3. Offline

    quickclay

    I'd suggest putting BukkitContrib in the thread title so people looking for BC plugins will be able to find this. :)
    Also, at some point a big list of achievements would be very cool. :D
     
  4. Offline

    Adelion

  5. Offline

    wassilij

    Bukkit 1000
    Code:
    2011-07-18 15:46:45 [SEVERE] Could not pass event CUSTOM_EVENT to Achievement
    java.lang.NullPointerException
        at me.ic3d.achievement.AIL.onInventoryCraft(AIL.java:20)
        at org.bukkitcontrib.event.inventory.InventoryListener.onCustomEvent(InventoryListener.java:41)
        at org.bukkit.plugin.java.JavaPluginLoader$87.execute(JavaPluginLoader.java:855)
        at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:58)
        at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:332)
        at org.bukkitcontrib.ContribNetServerHandler.a(ContribNetServerHandler.java:228)
        at net.minecraft.server.Packet102WindowClick.a(SourceFile:28)
        at net.minecraft.server.NetworkManager.b(NetworkManager.java:226)
        at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:85)
        at net.minecraft.server.NetworkListenThread.a(SourceFile:105)
        at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:451)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:361)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    Newest BukkitContrib on Client and Server.
     
  6. Offline

    jeanpoivrot

    Bukkit 1000 BukkitContrib 0.1.6

    Code:
    08:14:54 [INFO] [Achievement] Version 1.1 by IC3D enabled
    08:14:54 [INFO] [Achievement] Test query failed! Report the following error to captainawesome7:
    08:14:54 [SEVERE] java.sql.SQLException: No suitable driver found for jdbc:sqlite:/home/wtfomg/minecraft/plugins/Achievement/achievements.db
    08:14:54 [SEVERE]       at java.sql.DriverManager.getConnection(DriverManager.java:640)
    08:14:54 [SEVERE]       at java.sql.DriverManager.getConnection(DriverManager.java:222)
    08:14:54 [SEVERE]       at me.ic3d.achievement.Achievement.onEnable(Achievement. java:77)
    08:14:54 [SEVERE]       at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:126)
    08:14:54 [SEVERE]       at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:878)
    08:14:54 [SEVERE]       at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:272)
    08:14:54 [SEVERE]       at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:162)
    08:14:54 [SEVERE]       at org.bukkit.craftbukkit.CraftServer.enablePlugins(CraftServer.java:146)
    08:14:54 [SEVERE]       at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:284)
    08:14:54 [SEVERE]       at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:271)
    08:14:54 [SEVERE]       at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:148)
    08:14:54 [SEVERE]       at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:335)
    08:14:54 [SEVERE]       at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    
    :( sqlite is installed with apt-get
    achievement default settings
     
  7. Offline

    wassilij

    Yes .. its broken with Bukkit 1000 :(
     
  8. Offline

    majorcyto

    Anyway there can be something like /acheivreload or something similar so you can reload the config file in the game to add more achievements?

    Please dont use just /reload as everyone and there mother fight for that spot.
     
  9. Offline

    captainawesome7

    Ill add /achreload i the next version
     
  10. Offline

    majorcyto

    Thanks man!

    Also btw on the latest rev's im getting this popping up!

    Code:
    05:52:02 [SEVERE] Could not pass event CUSTOM_EVENT to Achievement
    java.lang.NullPointerException
        at me.ic3d.achievement.AIL.onInventoryCraft(AIL.java:20)
        at org.bukkitcontrib.event.inventory.InventoryListener.onCustomEvent(InventoryListener.java:41)
        at org.bukkit.plugin.java.JavaPluginLoader$87.execute(JavaPluginLoader.java:855)
        at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:58)
        at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:332)
        at org.bukkitcontrib.ContribNetServerHandler.a(ContribNetServerHandler.java:228)
        at net.minecraft.server.Packet102WindowClick.a(SourceFile:28)
        at net.minecraft.server.NetworkManager.b(NetworkManager.java:226)
        at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:85)
        at net.minecraft.server.NetworkListenThread.a(SourceFile:105)
        at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:451)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:361)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    
    But over and over again o.o @captainawesome7

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

    jeanpoivrot

    guys how u have fixed this problem ?

    08:14:54 [INFO] [Achievement] Test query failed! Report the following error to captainawesome7: 08:14:54 [SEVERE] java.sql.SQLException: No suitable driver found for jdbc:sqlite:/home/wtfomg/minecraft/plugins/Achievement/achievements.db

    ?thx
     
  12. Offline

    captainawesome7

    If you don't have SQLite installed you have to install it.
     
  13. Offline

    jeanpoivrot

    it look like i have it installed :

    Code:
    apt-get install sqlite
    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    sqlite is already the newest version.
    0 upgraded, 0 newly installed, 0 to remove and 6 not upgraded.
    
    Ubuntu V11.04-server (64BITS)
     
  14. Offline

    majorcyto

    Will the next update with the reload command be here soon?
     
  15. Offline

    Carbondani

    CainFoool said:
    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

    how can i change it to / ? i am a noob in this sorry :confused:
     
  16. Offline

    majorcyto

    pokes @captainawesome7

    Soo about that update, and fixing that error >_>
     
  17. Offline

    Hibout

    Iconomy support? when are you fixing that? :p waiting and waiting and still waiting patiently :)
     
  18. Offline

    captainawesome7

    It isn't the wrong type of / for me. I'll replace it with System.getProp("file.separator"), I think that returns the appropriate / or \

    I have stuff to do today but I can most likely get the next version out by later today.

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

    majorcyto

    Thank god. that error is so spammy.

    What happened to the update? :p

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

    Torner92

    First let me say that this is a great plugin but unfortunately do not work 100% for me. My achievments work very well but when I get a achievments so it is only in chat and not in the corner. I have BukkitContrib installed. You also write that you should have Client mod and follow those with Bukkitcontrib or is it a separate plugin?
     
  21. Offline

    Etburn

    Found a bug :(

    [​IMG]

    Why is this crap in the chat box -.-
     
  22. Offline

    majorcyto

    Its not a bug, if they do not have bukkit contrib client installed it will show up in the chatbox for the user, instead as a pop up notification.

    @Etburn
     
  23. Offline

    captainawesome7

    I''ll update it right now.
    You need to install the BukkitContrib server plugin and the BukkitContrib client mod. BukkitContrib (and client mod)
    Exactly what majorcyto said, if the user doesn't have BukkitContrib installed and/or you don't have the BukkitContrib server plugin installed it will default to showing achievements via chat.

    Done.
    Fixed in 1.2
    Added iConomy in 1.2

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

    Etburn

    Yea, but i have it installed ;)

    + in the minecraft.jar, thats annoying -.-

    //EDIT: Now my minecraft wont start... blackscreen :/ (reinstalled bukkitcontrib because i read, that it isnt compatible with modloader)

    //EDIT 2: Fixxed this, but it comes once more in the chat :( help me pls
     
  25. Offline

    Carbondani

  26. Offline

    captainawesome7

    I'm not helping you with installing a client mod. It isn't that difficult.
     
  27. Offline

    Etburn

    yea i havent meant that xD i mean, it doesnt work, i done all from the bukkitcontrib thread you linked...
     
  28. Offline

    captainawesome7

    Well it works for me and everyone on my server. Your inability to install a server plugin and a client mod is not my problem.
     
  29. Offline

    Etburn

    could you tell me how to install or not?

    because ive done it like in a youtube tutorial -.-

    //EDIT: Or just upload your minecraft.jar?
     
  30. Offline

    captainawesome7

    I'm not illegally distributing minecraft just because you can't install a client mod correctly.
     
  31. Offline

    EMOberger

    Should really have a wiki page or something explaining all of the blocks we can use, for example could i have an achievement for shooting 1000 arrows?
     

Share This Page