[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

    This plugin doesn't use a lib folder.
     
  3. Offline

    jlu

    Hey dude, can you add support to gain permissions.note for rewards?
     
  4. Offline

    captainawesome7

    What?
     
  5. Offline

    jlu

    Like:

    Code:
    Crafts:
        torch:
            '1':
                Reward:
                    Money:
                        Amount: 5
                    Perm.:
                        - 'herp.derp'
                Message: Light it up!
    To gain an extra power (herp.derp spell for ex) when an achievement is complete.
     
    EMOberger likes this.
  6. Offline

    EMOberger

    As of right now i would not use this, but it sounds interesting :D
     
  7. Offline

    captainawesome7

    Well giving a player permissions is a lot harder and more labor (code) intensive than checking if they have one, I really don't want to hook into every known permissions system to add a permission node to a player.
    I could, however, implement an AchievementGetEvent which would be like Bukkit events but every time a player gets an achievement. You could hook into that and make it yourself, because I really don't want to.
     
  8. Offline

    EMOberger

    @captainawesome7 How complicated would it be to have an achievement for shooting arrows? Think you could make it happen?
     
  9. Offline

    BioRage

  10. Offline

    jlu

    I'm too nqqb for that. Thks however ;)
     
  11. Offline

    TOAST7312





    The why the hell did he tell me this and how do I fix my above-mentioned problem?
     
  12. Offline

    captainawesome7

    idfk
     
  13. Heyho,

    like many others here, i get this error when i start the server.

    I downloaded sqlite with appget and also put the sqlite.jar in the lib folder like someone said in this thread, but i still get this error.

    Does someone exactly know how to fix this error. Where do i have to download which file etc.

    Pls help :(

    eXi
     
  14. Offline

    captainawesome7

    You need to install SQLite if you haven't already. If you do have it installed, idk what the problem is. All I know is that it works perfectly on an iMac.
     
  15. Offline

    BloppyBuilder

    Is that possible?
     
  16. Offline

    captainawesome7

    Not easily. And not without being cpu intensive for at least a few seconds.
     
  17. Yeah,

    but can you tell me how? I can download a file named sqlite3, but where to put it? ./sqlite3 only starts the sqlite, but i dont get this driver thing to work. Does noone have a good tutorial for this :(?

    EDIT: With "sqlite3" he puts me in the sqlite commandline. So i guess its installed.
     
  18. Offline

    TOAST7312

    T_T And I wanted to use this plugin, too.

    Here's the error again in case you need it for reference towards fixing it. Or helping solve the problem I'm having.

    Code:
    15:55:15 [INFO] [Achievement] 3co not found.
    15:55:15 [INFO] [Achievement] iConomy found, hooking in.
    15:55:15 [INFO] [Achievement] Version 1.3 by IC3D enabled
    15:55:15 [INFO] [Achievement] Test query failed! Report the following error to c
    aptainawesome7:
    15:55:15 [SEVERE] java.sql.SQLException: No suitable driver found for jdbc:sqlit
    e:C:\Users\Alexander\Desktop\Minecraft\Bukkit\plugins\Achievement\achievements.d
    b
    15:55:15 [SEVERE]       at java.sql.DriverManager.getConnection(Unknown Source)
    15:55:15 [SEVERE]       at java.sql.DriverManager.getConnection(Unknown Source)
    15:55:15 [SEVERE]       at me.ic3d.achievement.Achievement.onEnable(Achievement.
    java:100)
    15:55:15 [SEVERE]       at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlug
    in.java:126)
    15:55:15 [SEVERE]       at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(
    JavaPluginLoader.java:885)
    15:55:15 [SEVERE]       at org.bukkit.plugin.SimplePluginManager.enablePlugin(Si
    mplePluginManager.java:278)
    15:55:15 [SEVERE]       at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftSe
    rver.java:178)
    15:55:15 [SEVERE]       at org.bukkit.craftbukkit.CraftServer.enablePlugins(Craf
    tServer.java:161)
    15:55:15 [SEVERE]       at net.minecraft.server.MinecraftServer.e(MinecraftServe
    r.java:286)
    15:55:15 [SEVERE]       at net.minecraft.server.MinecraftServer.a(MinecraftServe
    r.java:273)
    15:55:15 [SEVERE]       at net.minecraft.server.MinecraftServer.init(MinecraftSe
    rver.java:149)
    15:55:15 [SEVERE]       at net.minecraft.server.MinecraftServer.run(MinecraftSer
    ver.java:337)
    15:55:15 [SEVERE]       at net.minecraft.server.ThreadServerApplication.run(Sour
    ceFile:422)>
     
  19. Offline

    mdcdeve

    Have the same problem as above as follows.

    Code:
    20:23:55 [INFO] [Achievement] 3co not found.
    20:23:55 [INFO] [Achievement] iConomy found, hooking in.
    20:23:55 [INFO] [Achievement] Version 1.3 by IC3D enabled
    20:23:55 [INFO] [Achievement] Test query failed! Report the following error to c
    aptainawesome7:
    20:23:55 [SEVERE] java.sql.SQLException: No suitable driver found for jdbc:sqlit
    e:I:\Minecraft\BukkitA\plugins\Achievement\achievements.db
    20:23:55 [SEVERE]       at java.sql.DriverManager.getConnection(Unknown Source)
    20:23:55 [SEVERE]       at java.sql.DriverManager.getConnection(Unknown Source)
    20:23:55 [SEVERE]       at me.ic3d.achievement.Achievement.onEnable(Achievement.
    java:100)
    20:23:55 [SEVERE]       at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlug
    in.java:126)
    20:23:55 [SEVERE]       at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(
    JavaPluginLoader.java:885)
    20:23:55 [SEVERE]       at org.bukkit.plugin.SimplePluginManager.enablePlugin(Si
    mplePluginManager.java:278)
    20:23:55 [SEVERE]       at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftSe
    rver.java:178)
    20:23:55 [SEVERE]       at org.bukkit.craftbukkit.CraftServer.enablePlugins(Craf
    tServer.java:161)
    20:23:55 [SEVERE]       at net.minecraft.server.MinecraftServer.e(MinecraftServe
    r.java:286)
    20:23:55 [SEVERE]       at net.minecraft.server.MinecraftServer.a(MinecraftServe
    r.java:273)
    20:23:55 [SEVERE]       at net.minecraft.server.MinecraftServer.init(MinecraftSe
    rver.java:149)
    20:23:55 [SEVERE]       at net.minecraft.server.MinecraftServer.run(MinecraftSer
    ver.java:337)
    20:23:55 [SEVERE]       at net.minecraft.server.ThreadServerApplication.run(Sour
    ceFile:422)
     
  20. Offline

    Legolas1231

    @Deathmarine
    I just did what you said but I keep getting the error as above. Too bad it doesn't work, it would be so cool ;D
     
  21. Offline

    scrollsmash

    I'm going to have a stab in the dark here and guess that everyone getting the SQLite driver errors are also running RB#1060 and the updated version of Spout? I was running this with no problems until just a few days ago when I upgraded to the new #1060 and new Spout and now am getting the same issue. Developer can you please fix this?
    Also for those that keep asking if this works with Spout, yes it DID but apparently not anymore.
    I have to say I am upset to see comments from the guy in charge like this:
    "You need to install SQLite if you haven't already. If you do have it installed, idk what the problem is. All I know is that it works perfectly on an iMac." <---- So are you saying you wont help anyone if they aren't on an iMac?
    TOAST7312 said:
    Still waiting on where I can get this lib file or if I have to make it, seeing as the plugin didn't make it itself.

    EDIT: What I mean to say is I have the lib folder, but the file in there that is supposed to be is not.​
    "This plugin doesn't use a lib folder." <----- Do you know how your plugin works? It DOES actually because it uses SQLite which is in the lib folder lol.
    @TOAST7312 The lib folder is in your server folder, which is where you launch your Minecraft server from. You need the SQLite.jar in there.
    That comment about it running fine on an iMac is just plain wrong.
    I hope this didn't sound too harsh as I really love this plugin, I think it is definately a necessity for any RPG/MMO style server but there is a fix needed and better support. :D
     
  22. Offline

    wassilij

    Craftbukkit 1060
    Spout 1.0.2
    Achievments 1.3
    Code:
    2011-08-18 14:06:55 [SEVERE] Could not pass event BLOCK_BREAK to Achievement
    java.lang.NullPointerException
        at me.ic3d.achievement.Achievement.registerBreak(Achievement.java:151)
        at me.ic3d.achievement.ABL.onBlockBreak(ABL.java:32)
        at org.bukkit.plugin.java.JavaPluginLoader$37.execute(JavaPluginLoader.java:497)
        at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:58)
        at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:338)
        at net.minecraft.server.ItemInWorldManager.c(ItemInWorldManager.java:157)
        at net.minecraft.server.ItemInWorldManager.a(ItemInWorldManager.java:121)
        at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:481)
        at net.minecraft.server.Packet14BlockDig.a(SourceFile:42)
        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:435)
        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)
    2011-08-18 14:06:56 [SEVERE] Could not pass event BLOCK_BREAK to Achievement
    java.lang.NullPointerException
        at me.ic3d.achievement.Achievement.registerBreak(Achievement.java:151)
        at me.ic3d.achievement.ABL.onBlockBreak(ABL.java:32)
        at org.bukkit.plugin.java.JavaPluginLoader$37.execute(JavaPluginLoader.java:497)
        at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:58)
        at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:338)
        at net.minecraft.server.ItemInWorldManager.c(ItemInWorldManager.java:157)
        at net.minecraft.server.ItemInWorldManager.a(ItemInWorldManager.java:44)
        at net.minecraft.server.EntityPlayer.m_(EntityPlayer.java:104)
        at net.minecraft.server.World.entityJoinedWorld(World.java:1212)
        at net.minecraft.server.WorldServer.entityJoinedWorld(WorldServer.java:48)
        at net.minecraft.server.World.playerJoinedWorld(World.java:1194)
        at net.minecraft.server.World.cleanUp(World.java:1110)
        at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:450)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:363)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
     
  23. Offline

    scrollsmash

    @wassilij Check your server log, it will more than likely say Achievements could not find db because thats the error I get due to the "SQLite" driver error.
     
  24. Offline

    TOAST7312

    @scrollmash Doesn't sound harsh at all; sounds appropriate. But the problem with your theory is that these are the contents of my Lib folder(I already knew where it was, but TY):

    Native(Folder)
    h2.jar
    mysql.jar
    postgresql.jar
    Regsiter.jar
    sqlite.jar
    sqlitejdbc-v056.jar
    win-x86.lib

    AKA, sqlite is already in there and it gives me the error. Or could it be due eto the ridiculous amount of things in there, for me at least? And also yes, we are on 1060 and the latest spout.

    EDIT: Yeah, SQlite.jar is definitely there as my a few of my plugins, such as bigbrother, are using it. I attempted to remove it and it either auto-generated or crashed the plugins. And here was the same error code I got trying to load Achievments AGAIN, while sqlite.jar was most definitely in my lib folder:

    Code:
    11:12:01 [INFO] [Achievement] 3co not found.
    11:12:01 [INFO] [Achievement] iConomy found, hooking in.
    11:12:01 [INFO] [Achievement] Version 1.3 by IC3D enabled
    11:12:01 [INFO] [Achievement] Test query failed! Report the following error to c
    aptainawesome7:
    11:12:01 [SEVERE] java.sql.SQLException: No suitable driver found for jdbc:sqlit
    e:C:\Users\Alexander\Desktop\Minecraft\Bukkit\plugins\Achievement\achievements.d
    b
    11:12:01 [SEVERE]       at java.sql.DriverManager.getConnection(Unknown Source)
    11:12:01 [SEVERE]       at java.sql.DriverManager.getConnection(Unknown Source)
    11:12:01 [SEVERE]       at me.ic3d.achievement.Achievement.onEnable(Achievement.
    java:100)
    11:12:01 [SEVERE]       at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlug
    in.java:126)
    11:12:01 [SEVERE]       at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(
    JavaPluginLoader.java:885)
    11:12:01 [SEVERE]       at org.bukkit.plugin.SimplePluginManager.enablePlugin(Si
    mplePluginManager.java:278)
    11:12:01 [SEVERE]       at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftSe
    rver.java:178)
    11:12:01 [SEVERE]       at org.bukkit.craftbukkit.CraftServer.enablePlugins(Craf
    tServer.java:161)
    11:12:01 [SEVERE]       at net.minecraft.server.MinecraftServer.e(MinecraftServe
    r.java:286)
    11:12:01 [SEVERE]       at net.minecraft.server.MinecraftServer.a(MinecraftServe
    r.java:273)
    11:12:01 [SEVERE]       at net.minecraft.server.MinecraftServer.init(MinecraftSe
    rver.java:149)
    11:12:01 [SEVERE]       at net.minecraft.server.MinecraftServer.run(MinecraftSer
    ver.java:337)
    11:12:01 [SEVERE]       at net.minecraft.server.ThreadServerApplication.run(Sour
    ceFile:422)
    ------
    11:12:01 [INFO] LWC: Loading SQLite
    ------
    Lets examine this more closely;

    It says there is no suitable driver for jdbc:sqlite at the location achievements/achievements.db. Now when I go to the achievements folder under achievements, there is no .db folder. Was the plugin supposed to generate this? If so, is it not doing this because it is not detecting sqlite.jar? Or does it need a DIFFERENT type of sqlite?
     
  25. Offline

    captainawesome7

    Just as a cover statement before you read into this:
    YOU DO NOT NEED A JAR IN A LIB FOLDER TO RUN THIS PLUGIN
    Actually, you're 100% incorrect. Some plugins rely on an SQL connector that is sometimes placed in a lib folder. This one doesn't. SQL is actually included in JDK 1.6 under java.sql, which means absolutely no form of connector is required to use SQL in Java programs. As far as an iMac goes, I am aware that Mac OSX comes included with it's own version of Java, and I do not know if you have to do anything on a PC that you wouldn't have to on a Mac to get SQL to work. If you go ahead and decompile the .jar you will see that nowhere in the entire source is a lib folder ever mentioned. You do not need one to run this plugin, it works perfectly on my iMac and there is no lib folder to speak of. I'd hate to make this rambly, but your comment about the SQLite driver errors is even more wrong than the lib folder one. Just FYI, my iMac server is running CB #1060, SQLite 3, and the newest version of Spout. It all works fine, and I really have no idea why this isn't working for people.
    Yes, the plugin was supposed to generate an achievements.db file. No, it isn't because of a missing sqlite.jar, and what version of SQLite are you running?
     
  26. Offline

    scrollsmash

    @TOAST7312 Okay, Ive been running some tests and this works perfectly on my backup server which is all EXACTLY the same as my main server. Same plugins same config files...the ONLY difference is my main server is hosted on a linux box (proper dedicated server) and my back up is on a windows 7 operating system (at my home on a spare computer). Something obviously is broken so I am in the process of copying my back up server to the main, over write and then I will let you know if it works ;)
    @TOAST7312 And yes its not working because it cant run SQLite and when it does work it will create an "Achievements" folder with a .db file in it. That is where the achievements are stored.

    @captainawesome7 My apologies you're absolutely right. I am trying to learn all of this stuff and was fed some incorrect info by someone who has been doing this longer than me lol. In regards to your last statement, is it possible to get some sort of connector for SQLite? Would that help?

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

    TOAST7312


    I wasn't aware there were versions or that it was necessarily to update. In the past year of running a Minecraft server I have never had to update, alter, download, or otherwise change this file. Other plugins of mine have been using it just fine as well. Where/how can I find out what version it is, and where would I go download it?

    Also I didn't mean to offend you, I'm simply trying to get help where otherwise I haven't been able to. I appreciate the attempt.


    I figured as much. And very good that you're testing this. I personally am running just off a desktop running Windows Vista. I might attempt to try running the plugin on my server I use for testing plugins.

    EDIT:
    Ran the test on my alternate test server; no changes.
     
  28. Offline

    scrollsmash

    Interesting, I uploaded my entire backup server and replaced the hosted one. Still getting the same issue. But when I run it on the backup machine its fine.... I'm lost :eek:
     
  29. Offline

    TOAST7312

    I was going to say it might be an issue with an OS confliction or something, but I have no clue now. Lol.

    And not to change the subject, but would it be possible to get support for MultiCurrency on this(For when it is working for me)? I was thinking of switching over, but not a lot of mainstream plugins using economies seem to support it yet. There's info on how to hook into it on the OP so I don't see why.
     
  30. Offline

    rzeznix1999

    Can you upload older version? I can't use Spout.
    Sorry for my English im Pole
     
  31. Offline

    24Grox

    can you make a video on how to install that plugin?
     

Share This Page