[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

    kahlilnc

    Nice but you should add other ico support so others will try too?
     
  3. Offline

    Lolmewn Retired Staff

    awsum :p
     
  4. Offline

    OptimusAlive I steal plugins as my own

    Loving It :D
     
  5. Offline

    captainawesome7

    Yeah that is the plan but I was too lazy to add anything other than 3co for now. I will do iConomy and possibly BOSEconomy as well.
     
    Soldier187 and kahlilnc like this.
  6. Offline

    The Angry kat

  7. Offline

    captainawesome7

    Planned changes in v1.1:
    • Achievements for crafting items
     
  8. Offline

    IC3D

    1.1 adds crafting achievements!
     
  9. Offline

    tha d0ctor

    does this come with default achievements and if so how many?
     
  10. Offline

    captainawesome7

    Only a few, just to demonstrate how to make your own. I would recommend creating as many achievements as you can think of before you put this on your server, because if you add new ones later on your count of places/breaks/crafts/kills won't be reset.
     
  11. Offline

    Lukeroge

    Wewt! Been giving out bukkitcontrib to all my players for a while now.
    Thanks so much for making this :D

    Is it possible to use it with MySQL anyway? I already have a database being used by a few plugins and would prefer it to use that so I can access data from my site. Or, if the plugin uses Bukkit Persistence, I guess it would be using my database anyway.

    Never mind, just checked the source. Looks like it just connects to SQLite the database manually.
     
  12. Offline

    captainawesome7

    I am making plans to extend the database to MySQL, as well as only connecting to the database every few minutes. I am also changing it so that places/kills/crafts/breaks aren't recorded unless there is an achievement related to the specific block/animal/item.
     
  13. Offline

    Lukeroge

    Ah, I see. Looking at the code relating to the database, it looks like it would be pretty simple to modify it to use MySQL. I might have a go later for fun x)

    One idea would to be able to only make certain worlds count for achievements. I have a survival and a freebuild world and I would like to only offer them on the survival one.
     
  14. Offline

    captainawesome7

    Yeah, the creating tables query is identical, but accessing the data is a little bit different. I can definitely add multi-world tomorrow, but probably not MySQL by then.
     
  15. Offline

    Lukeroge

    Sounds good! I will be looking forward to the update for multiworld =)
     
  16. Offline

    Plague

    Update the plugin to latest recommended build and change the title accordingly.
    Failure to do so will result in this moving to INACTIVE section.
     
  17. Offline

    Macthezazou

    I Test now...

    Wenn i break the cobble i have a achievements and the message in the chat but not in the top on the left on the launcher!!!

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

    captainawesome7

    Then you don't have BukkitContrib installed..
     
  19. Offline

    Macthezazou

    Yes i habe bukkit contrib installed on my server and on my client!!!
     
  20. Offline

    captainawesome7

    Well it worked for me...
     
  21. Offline

    Macthezazou

    for instal BC I just must put bukkitcontrib.jar into my /minecraft/plugins

    Do you want my Server.log

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

    Rogueleader89

    is there a way to make an achievement for killing a certain number of other players?
     
  23. Offline

    captainawesome7

    Yep:
    Code:
    Kills:
        player:
            '1':
                Reward:
                    Item:
                        Amount: 1
                        Type: stone
                    Money:
                        Amount: 1
                Message: PVP Novice
     
  24. Offline

    Paradox256

    I get tons of errors when I run my server. I'm using Bukkit 977. I know it says it's for 953, but I mean, I'm using plugins that are supposed to be for 935 and even some that are older and they work fine. I also just installed BukkitContrib, but I still get these errors:

    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
    Sorry about the awkward error placement. Pasting the server log didn't turn out well.
     
  25. Offline

    captainawesome7

    What Java version are you using? And please include the entire error, it helps alot.
     
  26. Offline

    Paradox256

    Yeah, sorry about that. When I posted, it removed all the severe errors automatically for some reason. I fixed it.

    I have both Java 6 and 7 installed (Even though I'm pretty sure I uninstalled Java 6 at one point, but oh well) and I believe it's using Java 7. Is there a way I can tell which one it's running?

    Bukkit Contrib also seems to have given me a black screen...I should go check what version it's for. I have 1.7.3.

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

    captainawesome7

    I need to see the whole error to do anything about it.
     
  28. Offline

    Paradox256

    I already said that I edited my first post, but here is what I get when I start the server:

    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
    I also get a black screen when I log in and I think it has to do with BukkitContrib, seeing as it modifies the minecraft.jar. No errors for that, it just gives me the good ol' black screen.
     
  29. Offline

    captainawesome7

    I can't help you with the client side stuff, but it seems that your server host does not allow SQLite database connections. Are you hosting the server on your local machine?
     
  30. Offline

    Paradox256

    I am. Does it need to be on a hosted server? That would be a bummer, I really can't do that now.
     

Share This Page