[INACTIVE][INFO] Stats [v0.99] and Achievements [v0.99][1000]

Discussion in 'Inactive/Unsupported Plugins' started by nidefawl, Jan 20, 2011.

  1. Offline

    nidefawl

    Stats and Achievements

    This plugin will be found at dev-bukkit soon
    sockenklaus will manage this project in the future (thank you!)

    Features:
    • Stats
      • Logs many actions that players do!
      • Block Destoys(for each block), Item Uses, Damage Dealt, Deaths per type, Kills per type, Played-Time (with AFK flags!)...
      • '/stats' shows basic stats and more
      • '/played' shows your play-time on the server
      • Keeps all stats within a SQLite or MySQL Database
      • Your plugin can support Stats!
    • Achievements
      • Give users achievements when they have completed something!
      • e.g. MintyAnt mined 500 obsidian. Message "You have no life!" Appears, and they recieve the "No Life" achievment and 10 Diamond as a prize
      • Achievement-Conditions:
        • <achievement-name>
        • New in 0.9:
          • group <group-name>
          • permission <permissionstring>
        • can be multiple seperated by ;
        • each of them can have a inverting '!' (!group jailed;!badachievement)
        • can be none of course :)
      • Reward-Commands:
        • /item <name or id>
        • /money <negative or postive amount>
        • /group <group-name>, /warp <warp-name>
        • New in 0.9: Native console commands:
          • /op *;/time 13500;/god *;/kick *
          • use any console command that works on your console
        • New in 0.9 (GroupManager):
          • addsubgroup <groupname>
          • removesubgroup <groupname>
          • addpermission <permissionstring>
          • removepermission <permissionstring>
    Source:
    Download:
    Newest (Fix for updated plugins (iConomy, BOSEconomy, Essentials, Permissions 3)
    Old (Tested with #617 (works up to 1000!))
    If you still have problems with CraftIRC or iConomy + Achievements try one of the following version:
    Outdated versions:
    Configuration:
    Permissions for v0.9+:
    Show Spoiler

    Achievements:
    achievements.check - only players that have that permissions will be checked + awarded
    achievements.view.own - grants access to /achievements (/ach)
    achievements.view.list - grants access to /listachievements (/listach)
    achievements.admin.check - grants access to /checkachievements (/chekcach)
    achievements.admin.reload - grants access to /reloadachievements (/reloadach)

    Stats:
    stats.log - only actions of players that have that permissions will logged
    stats.view.own - allows a player to watch his own stats with the /stats command
    stats.view.others - allows a player to watch other players stats with the /stats <player> command
    stats.view.playtime - allows a player to watch his play-time with the /played command
    stats.admin - grants access to /stats debug + /stats set + /stats list

    Latest Changes:
    Show Spoiler

    Stats v0.99
    • Fix for Permissions 3.0
    Stats v0.985
    • Permissions fixed
    • Code cleanup
    • More settings, to disable logging of some events
    Stats v0.98
    • Attempt to fix plugin dependencies
    Stats v0.972
    • Attempt to fix Classpath and Updater... again
    Stats v0.96 (03-04-11)
    • Forgot to update internal version
    • Forgot wolf
    Stats v0.95 (03-04-11)
    • Updated to latest RB (617)
    • Better Permissions/GroupManager plugin handling
    • removed the usage of os-specific sqlite libraries. (lets see what happens)
    Achievements v0.99
    • Fix for newest Economy plugins
    Achievements v0.981
    • Attempt to fix plugin dependencies
    • fixed a typo with the 'achievements-definitions-sql'. Check your config!
    Achievements v0.972
    • Attempt to fix Classpath and Updater... again
    Achievements v0.96 (03-04-11)
    • Forgot internal version
    • Forgot wolf
    Achievements v0.95 (03-04-11)
    • Updated to latest RB (617)
    • Better warp-command handling for Essentials


    full Stats changelog
    full Achievements changelog

    Supported plugins:
    Tools:
    Please donate --> [​IMG]


    Please read the Wiki before posting:

     
  2. Offline

    MintyAnt

    The point is to drag it out of the "inactive plugins" place, and put it back where everyone else can see and use :D
     
  3. Awesome, I love updates :D
    I entered my achievements.txt into the sql converter linked in the OP, but what do I do with the output text? Do I have to type that in line by line, or is there a script that I can run? My MySQL knowledge runs to a total of being able to list table contents and perform a dump!
    Many thanks

    Edit: Oh yeah, one more thing. Every time I start the server I get this
    Code:
    23:24:48 [INFO] [Stats-0.8] Need to download 1 file(s)
    23:24:48 [INFO] [Stats-0.8]  - Downloading file : http://dev.craftland.org/stats/lib/native/Windows/amd64/sqlitejdbc.dll
    23:24:48 [INFO] [Stats-0.8]   + Download complete
    It likes to download the same file each time the server starts. I checked and the file definitely gets downloaded. Running CB556
     
  4. Offline

    nidefawl

    Just leave the definitions in the achievements.txt then

    Please post the whole startup log.
    Are you sure it creates the file in plugins/Stats/lib/... ?
     
  5. Code:
    Minecraft Remote Toolkit V1.0_b18_3 ALPHA
    Initializing...
    Loading toolkit properties...Done.
    Loading toolkit modules...Done.
    Wrapper is running on: Windows Server 2008 R2 6.1 amd64
    Starting wrapper...
    Starting UDP listen server on port 25561
    20-Mar-2011 02:08:56 net.wimpi.telnetd.net.PortListener run
    INFO: Listening to Port 25,561 with a connectivity queue size of 5.
    02:08:57 [INFO] Starting minecraft server version Beta 1.3
    02:08:57 [INFO] Loading properties
    02:08:57 [INFO] Starting Minecraft server on 192.168.0.101:25565
    02:08:57 [WARNING] **** SERVER IS RUNNING IN OFFLINE/INSECURE MODE!
    02:08:57 [WARNING] The server will make no attempt to authenticate usernames. Beware.
    02:08:57 [WARNING] While this makes the game possible to play without internet access, it also opens up the ability for hackers to connect with any username they choose.
    02:08:57 [WARNING] To change this, set "online-mode" to "true" in the server.settings file.
    02:08:57 [INFO] This server is running Craftbukkit version git-Bukkit-0.0.0-544-g6c6c30a-b556jnks (MC: 1.3)
    02:08:57 [INFO] Preparing level "world"
    02:08:57 [INFO] Preparing start region
    02:08:58 [INFO] Preparing spawn area: 69%
    02:08:59 [INFO] [Permissions] version [2.5.4] (Phoenix) was Initialized.
    02:09:00 [INFO] WorldGuard loaded.
    02:09:00 [INFO] All items will be kept
    02:09:00 [INFO] [BBROTHER] BBData MySQL Driver r1 loaded!
    02:09:00 [INFO] [BBROTHER] Permissions enabled using: Permissions v2.5.4
    02:09:01 [INFO] [BBROTHER] 'Help' support enabled
    02:09:01 [INFO] [BBROTHER] BigBrother 1.7.1 enabled
    02:09:01 [INFO] Starting config task...
    02:09:01 [INFO] bSwarm version 0.5.1 is enabled!
    02:09:02 [INFO] [BukkitUp]: BukkitUp V.2.0 by Triii.ws, Now initialized & checking for updates....
    02:09:02 [INFO] [BukkitUp]: Server is up to date!
    02:09:02 [INFO] CrowdControl version 0.2 is enabled
    02:09:02 [INFO] [Permissions] version [2.5.4] (Phoenix)  loaded
    02:09:02 [INFO] Loading map 'org.dynmap.flat.FlatMap'...
    02:09:02 [INFO] Loading map 'org.dynmap.kzedmap.KzedMap'...
    02:09:02 [INFO] Loading renderer 'org.dynmap.kzedmap.DefaultTileRenderer'...
    02:09:02 [INFO] Loading renderer 'org.dynmap.kzedmap.CaveTileRenderer'...
    02:09:02 [INFO] Activated world 'world' in Dynmap.
    02:09:02 [INFO] Loading map 'org.dynmap.flat.FlatMap'...
    02:09:02 [INFO] Loading map 'org.dynmap.kzedmap.KzedMap'...
    02:09:02 [INFO] Loading renderer 'org.dynmap.kzedmap.DefaultTileRenderer'...
    02:09:02 [INFO] Dynmap WebServer started on null:8123
    02:09:02 [INFO] [EpicZones] Created Zone [John's Arena]
    02:09:02 [INFO] [EpicZones] Created Zone [Treasure Room]
    02:09:02 [INFO] [EpicZones] Created Zone [Portal Hub]
    02:09:02 [INFO] [EpicZones] Created Zone [Leigh's House]
    02:09:02 [INFO] [EpicZones] Created Zone [Hell Hub]
    02:09:02 [INFO] [EpicZones] Permission system [GroupManager] not found. Disabling plugin.
    02:09:02 [INFO] [EpicZones] version 0.18 is disabled.
    02:09:02 [INFO] [EpicZones] version 0.18 is enabled.
    02:09:03 [INFO] Loaded Essentials build 2.0.295 maintained by Zenexer, ementalo, Aelux, Brettflan, KimKandor, snowleo and ceulemans.
    02:09:03 [INFO] [HELP] 44 extra help entries loaded
    02:09:03 [INFO] [HELP] Permissions enabled using: Permissions v2.5.4
    02:09:03 [INFO] [HELP] Help 0.2 enabled
    02:09:03 [INFO] [HeroChat] Permissions 2.5.4 found.
    02:09:03 [INFO] [HeroChat] HeroChat version 4.7.2 enabled.
    02:09:03 [INFO] [HeroicDeath] 1.6.0.143 enabled.
    02:09:03 [INFO] MCDocs - Permissions Detected!
    02:09:03 [INFO] MCDocs by Tazzernator (Andrew Tajsic) - version 5.2.2 is enabled!
    02:09:03 [INFO] Memory max: 1069416448 bytes
    02:09:03 [INFO] Memory total: 114061312 bytes
    02:09:03 [INFO] Remote Toolkit Plugin V0.31b enabled!
    02:09:03 [INFO] Nether v1.1 enabled
    02:09:03 [INFO] PermissionsSupport: Found Permissions, using it for permissions.
    02:09:03 [INFO] PermissionsSupport version 0.1 is enabled
    02:09:03 [INFO] Persistence version 0.61 is enabled
    02:09:03 [INFO] PlayerCount version 1.0 is enabled!
    02:09:03 [INFO] [Stats-0.8] Need to download 1 file(s)
    02:09:03 [INFO] [Stats-0.8]  - Downloading file : http://dev.craftland.org/stats/lib/native/Windows/amd64/sqlitejdbc.dll
    02:09:04 [INFO] [Stats-0.8]   + Download complete
    02:09:04 [INFO] [Stats-0.8] Converted 0 stat files to MySQL
    02:09:04 [INFO] [Stats-0.8] Using Nijis Permissions for permissions
    02:09:04 [INFO] [Stats-0.8] Plugin Enabled
    02:09:04 [INFO] [Achievements-0.8] Found required plugin: Stats
    02:09:04 [INFO] [Achievements-0.8] loaded 66 achievements definitions
    02:09:04 [INFO] [Achievements-0.8] Achievements 0.8 Plugin Enabled
    02:09:04 [INFO] WorldEdit 4.2 enabled.
    02:09:04 [INFO] WorldEdit: Permissions plugin detected! Using Permissions plugin for permissions.
    02:09:04 [INFO] WorldGuard: Permissions plugin detected! Using Permissions plugin for permissions.
    02:09:04 [INFO] WorldGuard 4.0-alpha1 enabled.
    02:09:04 [INFO] Done (0.752s)! For help, type "help" or "?"
    Yeah, I checked in the folder "\plugins\Stats\lib\native\Windows\amd64" and the file is definitely there. And thanks, I'll just leave the .txt there :)
     
  6. Offline

    Joe_Young

    updated with no issues even though i'm still running 493

    although, for some reason all the prizes were rerewarded
     
  7. Offline

    Olaf

    Hi, great plugin. There's a small typo in the 0.8 update though: the achievements jar is called achievments (and it creates an achievments folder) which seems to mess up the auto-update because the auto update failed and i had to put the jar and folder in manually. No big deal, everything works but it might be neater if you change this in the next update.
     
  8. Offline

    Abadon84

    mhhh since the update and convert to sql every player is getting his achievements twice ingame. in the db player_achievements the achievement is only once so it should be... its al little bit strange...
    any hints ?
    SOLVED: Its because of the same typo, because of this it run twice^^
     
  9. Offline

    Lord Chaos

    For some odd reason both my servers are doing this near constantly:

    Code:
    2011-03-20 14:08:16 [INFO] [Stats-0.8] new stat!!!!
    2011-03-20 14:08:16 [INFO] [Stats-0.8] new stat!!!!
    2011-03-20 14:08:16 [INFO] [Stats-0.8] new stat!!!!
    2011-03-20 14:08:36 [INFO] [Stats-0.8] new stat!!!!
    2011-03-20 14:08:36 [INFO] [Stats-0.8] new stat!!!!
    2011-03-20 14:09:16 [INFO] [Stats-0.8] new stat!!!!
    2011-03-20 14:09:16 [INFO] [Stats-0.8] new stat!!!!
    2011-03-20 14:09:36 [INFO] [Stats-0.8] new stat!!!!
    2011-03-20 14:09:36 [INFO] [Stats-0.8] new stat!!!!
    2011-03-20 14:09:36 [INFO] [Stats-0.8] new stat!!!!
     
  10. Offline

    nidefawl

    Thx for pointing this out!!!
    sorry, forgot to remove that debug statement
    will upload a fix soon :)
     
  11. Offline

    Jandalf

  12. Offline

    nidefawl

    You can use sqlite instead
     
  13. Offline

    Jandalf

    and how do u do this? cause "sql-db = stats.db" seosnt work
     
  14. Offline

    nidefawl

    stats-datasource = sqlite
     
  15. Offline

    Jandalf

    thats what i have. it worked on 0.7 till an Permissions update and after that i wait for 0.8 now it throws another error:
     
  16. Offline

    mdt7734

    18:49:15 [SEVERE] [Achievements-0.8] Did not find a money plugin!

    Is this really SEVERE? I run no money or economy mods, is there an option to turn it off in achievements?
     
  17. Offline

    nidefawl

    just remove the achievements that use the money command
     
  18. Offline

    cyberbobjr

    Hi Nidefawl,
    thank you for your new version, it's great :)
    I have a question : since you have changed the achievements system for a sql, does it mean that "achievements.txt" is deprecated or it still use ?
    I say that because i need to know if i must modify and recode my Achievement editor.
    Thank you very much.
    Regards
     
  19. Offline

    Kiborgik

    hi
    when you plugin work correctly whith EssentialsProtect? it have sqllite integrate
     
  20. Offline

    nidefawl

    You can still use the achievements.txt
    What does not work, or what do you expect to work?
     
  21. Offline

    ssechaud

    I'm getting this error when reloading the server:

    18:17:59 [SEVERE] Could not pass event PLUGIN_DISABLE to Achievements
    java.lang.NullPointerException
    at com.nidefawl.Stats.Stats.get(Stats.java:792)
    at com.nidefawl.Achievements.Achievements.checkAchievements(Achievements.java:304)
    at com.nidefawl.Achievements.Achievements.Disable(Achievements.java:253)
    at com.nidefawl.Achievements.Achievements$AchievementsServerListener.onPluginDisabled(Achievements.java:89)
    at org.bukkit.plugin.java.JavaPluginLoader$32.execute(JavaPluginLoader.java:321)
    at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:59)
    at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:255)
    at org.bukkit.plugin.java.JavaPluginLoader.disablePlugin(JavaPluginLoader.java:467)
    at org.bukkit.plugin.SimplePluginManager.disablePlugin(SimplePluginManager.java:229)
    at org.bukkit.plugin.SimplePluginManager.disablePlugins(SimplePluginManager.java:223)
    at org.bukkit.plugin.SimplePluginManager.clearPlugins(SimplePluginManager.java:236)
    at org.bukkit.craftbukkit.CraftServer.reload(CraftServer.java:258)
    at org.bukkit.command.SimpleCommandMap$ReloadCommand.execute(SimpleCommandMap.java:196)
    at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:80)
    at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:221)
    at net.minecraft.server.MinecraftServer.b(MinecraftServer.java:380)
    at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:366)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:272)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:366)

    And stopping:

    18:25:54 [SEVERE] Could not pass event PLUGIN_DISABLE to Achievements
    java.lang.NullPointerException
    at com.nidefawl.Stats.Stats.get(Stats.java:792)
    at com.nidefawl.Achievements.Achievements.checkAchievements(Achievements.java:304)
    at com.nidefawl.Achievements.Achievements.Disable(Achievements.java:253)
    at com.nidefawl.Achievements.Achievements$AchievementsServerListener.onPluginDisabled(Achievements.java:89)
    at org.bukkit.plugin.java.JavaPluginLoader$32.execute(JavaPluginLoader.java:321)
    at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:59)
    at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:255)
    at org.bukkit.plugin.java.JavaPluginLoader.disablePlugin(JavaPluginLoader.java:467)
    at org.bukkit.plugin.SimplePluginManager.disablePlugin(SimplePluginManager.java:229)
    at org.bukkit.plugin.SimplePluginManager.disablePlugins(SimplePluginManager.java:223)
    at org.bukkit.craftbukkit.CraftServer.disablePlugins(CraftServer.java:81)
    at net.minecraft.server.MinecraftServer.g(MinecraftServer.java:227)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:302)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:366)
     
  22. Offline

    Jandalf

    hm, do u overread this or do u need more infos? CB 556 and Permissions 2.5.4 and many more but i dont think that this is a plugin conflict...
     
  23. Offline

    nidefawl

    Sorry, most of the problems are caused by the broken updater (what Olaf has posted)

    I need somebody with a large set of plugins and some knowledge to test the builds for me before I put them up .
     
  24. Offline

    Kiborgik

    crash server whith doble try loading sqllite
     
  25. What sort of knowledge are you talking about? Check the link in my signature for a list of plugins my server is running. Although I am more than happy to make a test server to play on, and keep adding plugins until something breaks!
     
  26. Offline

    TomWolf

    An achievement suggestion (sorry if it's in there and I just havn't seen it):
    Survived X nights
    Survived X playtime

    This would work well with a plugin I'm considering making unless I find one that does it allready wich makes the players 'starve'. Not sure if I'm able to do it though since I havn't tried making a plugin or minecraft yet.

    Perhaps if you are able to make people 'away' if inactive it could pause the 'playtime' stats, atleast when it comes to achievements. (just saw that you have an afk in place allready =)

    Is it possible to make the rewards optional? And perhaps have different rewards depending on if you have iConomy or not?

    Just a couple of thoughts, love the plugin.

    Been thinking about my last post a bit and checking out the achievement creator program. I have two suggestions.

    Stats that can be reset.
    stoneswithoutcoal - would get increased with each stone but reset to zero once you get coal
    coalsinarow - would get increased with each coal but reset to zero once you mine something else
    would make for achievement 'You've been digging 1000 stones without striking coal' and 'You managed to mine 10|15|20 coals in a row, now take up smoking and you'll have cancer in no time.'

    Make it possible to compare two or more stats.
    With just < > it would make my surivived for X hours/nights achievements possible without adding a special stat.
    With a bit more comparison it would be possible to do stuff like 'You've been digging 10000 stones without finding anything valuable.' by comparing stoneswithoutcoal, stoneswithoutgold etc.
    stat1 + stat2 + stat3 > 9999 AND stat1 /= 0 AND stat2 /= 0 AND stat 3 /= 0

    The above would also make meta achievements more possible.
    ach1 > 0 AND ach2 > 0 AND ach3 > 0

    A function wich saves your stat at log in to a temporary stat.
    blocksdestroyed:dirt would be saved to
    blocksdestroyedlastlog:dirt
    This would make it possible to compare the two and see how many you've destroyed this session. The reason to save the stat at log in rather then log out would be so that you could check how long since you logged out and if you logged out less then 5 min ago you don't save it to the temp stat. That way the old session continues if you havn't been logged out for very long.

    The above would also open up for session streaks. That is, stats that is increased each session you do something but reset to zero once you end a session without doing it. Like you've killed atleast one player each of your last X sessions.

    For other addonwriters it would also be great if you could put in extra information that is ignored unless looked for. If your commands work like what I describe you can ignore this ;)
    --name:value
    That way it would,as an example be easy for a webinterface to add images to achievements and still share those achievements with others that don't have the webinterface. Or perhaps add the value of another economy.
    --gif:deathmedal.gif --othereconomy:100

    Taking a cue from WoW, achievement points? Add a value to each achievment just for the sake of having it.

    Signs
    I'd like to be able to reward achievements with a sign with a name.
    -------------
    Diploma
    Treehugger
    -------------
    Also it would be great if it were possible to have a sign that updates with your achievement points, if that is implemented that is.
    Another updating sign would be to update a particular stat
    -------------
    :kills
    :Spider
    xx
    -------------

    These are just ideas I've thought of without checking very deep into your wonderful addon so forgive me if I've stated something you've allready done and I've just not discovered it yet.

    Bug report:
    I use MyWarp and MyHome for my teleportating needs. When I use /warp the teleport stat works correctly but when I use /home or /home username it increases by 2.

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

    Lord Chaos

    I would really like to see the "new stat" spam go away, it makes it hard to keep up with what goes on in the console. :(
     
  28. Offline

    Jandalf

    hm, which updater? the one from stats? i have ca 15 plugins knowledge about computers but not about java...
     
  29. Offline

    Dope

    Yeah that is kind of annoying to me as well..
    Hope it will be fixed soon.

    Anyways, awesome mod!
     
  30. Offline

    nidefawl

    Here is a new Version with fixed Updater and fixed Essentials /money-command
    Make sure to delete the wrongly created plugins/Achievments.jar and plugins/Achievments-directory before you start the server

    Stats_v0.82_+_Achievements_v0.82.zip

    If there are no problems I will add the links to the OP

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

    crazydog

    Not 100% sure on this, but when I see "new stat" in the console, my CPU usage goes up to 100% for a little while. It seems to be related, but I'm not sure. I'm on a Core 2 Quad @ 2.8 Ghz.
     

Share This Page