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

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

  1. Offline


    Stats and Achievements

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

    • 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>
    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:
    Permissions for v0.9+:
    Show Spoiler

    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.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:
    Please donate --> [​IMG]

    Please read the Wiki before posting:

  2. Offline


    Sorry for the broken updater, I'm working on it right now :)
    yes, you need Stats to use Achievements!
    Its not really hidden, configure the following two lines in the Achievements/achievements.properties:
    achievements-craftirc = true
    achievements-craftirc-tags = channeltag1,tagadminchannel
    replace the tags with the ones you want to send the messages two

    I'll work out better support for GroupManager :)

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


    Hm, so ive installed Stats, but it does not generate a folder, and when i type /ach ingame it gives me an error saying: An internal error has occured etc etc, but when i type /plugins i have Stats and Achievements.

    Thanks for you quick reply by the way.

    does this not work with herochat?

    - I got it working again, however the things i stated above is still the case practilly, i do have a stats map now, i cant do any commands ingame though.

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


    To get back to this: the '!'-Not condition is still in, the 'group' condtion has to be added to make the following work:
    1:VeteranUpgrade:1:stats:playedfor:126000:Vet upgrade:!BeenWarned;group veteran
    I'll add it!

    Next version has also 'addpermission' and 'subgroup' command for GroupManager :)
  5. Offline


  6. Offline


    Using files from the .82 update zip reports .8
    And getting same update errors as everyone else.
  7. Offline


    okay, am I COMPLETELY insane or is there no documentation on how this works anywhere? T_T

    (and by that I mean "someone help me D;")

    I put the jars into the plugins folder, loaded the server, it downloaded stuff, then said that the plugins are disabled.
    It does that every time I load it.
    I have no achievements.txt file (but I do have a achievements.properties file).
    I don't see anything that explains how to set up achievements, and none of the commands work. I would assume that this is because the plugins aren't enabled, but I have no idea how to change this.

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


    completey blind! (check my signature for the wiki link)
    better wait for 0.9, will soon be out
    0.82? its broken, wait for 0.9

    wait for 0.9 :)
  9. Offline


    Well the wiki didn't really help me at all, but I guess that's just cuz it's broken :p
    Waiting! :D
    Riley Sykes likes this.
  10. Offline


    Hi, I have one problem.
    I want to use mysql but I always have got the same error.

    2011-03-25 15:29:24 [INFO] LWC    Loading SQLite
    2011-03-25 15:29:25 [INFO] SQLite    Using: Pure
    2011-03-25 15:29:25 [INFO] LWC    At version: v1.63
    2011-03-25 15:29:25 [SEVERE] [Stats-0.9] Error getting SQL-connection: com.mysql.jdbc.Driver
    2011-03-25 15:29:25 [SEVERE] java.lang.ClassNotFoundException: com.mysql.jdbc.Driver
    2011-03-25 15:29:25 [SEVERE]     at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
    2011-03-25 15:29:25 [SEVERE]     at java.security.AccessController.doPrivileged(Native Method)
    2011-03-25 15:29:25 [SEVERE]     at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
    2011-03-25 15:29:25 [SEVERE]     at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:30)
    2011-03-25 15:29:25 [SEVERE]     at java.lang.ClassLoader.loadClass(ClassLoader.java:319)
    2011-03-25 15:29:25 [SEVERE]     at java.lang.ClassLoader.loadClass(ClassLoader.java:264)
    2011-03-25 15:29:25 [SEVERE]     at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:332)
    2011-03-25 15:29:25 [SEVERE]     at java.lang.Class.forName0(Native Method)
    2011-03-25 15:29:25 [SEVERE]     at java.lang.Class.forName(Class.java:186)
    2011-03-25 15:29:25 [SEVERE]     at com.nidefawl.Stats.datasource.StatsSQLConnectionManager.getConnection(StatsSQLConnectionManager.java:25)
    2011-03-25 15:29:25 [SEVERE]     at com.nidefawl.Stats.Stats.onEnable(Stats.java:548)
    2011-03-25 15:29:25 [SEVERE]     at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:118)
    2011-03-25 15:29:25 [SEVERE]     at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:451)
    2011-03-25 15:29:25 [SEVERE]     at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:217)
    2011-03-25 15:29:25 [SEVERE]     at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:92)
    2011-03-25 15:29:25 [SEVERE]     at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:70)
    2011-03-25 15:29:25 [SEVERE]     at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:204)
    2011-03-25 15:29:25 [SEVERE]     at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:191)
    2011-03-25 15:29:25 [SEVERE]     at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:131)
    2011-03-25 15:29:25 [SEVERE]     at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:246)
    2011-03-25 15:29:25 [SEVERE]     at net.minecraft.server.ThreadServerApplication.run(SourceFile:366)
    2011-03-25 15:29:25 [SEVERE] [Stats-0.9] Could not establish SQL connection. Disabling Stats
    Here is my stats.properties file
    sql-db = jdbc:mysql://localhost:3306/stats
    sql-user = user
    sql-pass = password
    sql-table-stats = stats
    stats-afk-delay = 300   # (seconds) If there is no player-activity in this time playedfor does not get updated. Set to 0 to disable.
    stats-autoUpdate = false
    stats-datasource = mysql   #dropped flatfile support
    stats-deathnotify = true
    stats-debug = false
    stats-login-delay = 3600   #limit between login-count increases
    stats-message-prefix = &e[Stats]&f
    stats-save-delay = 30   #delay between automatic saving (seconds)
    Can someone help me?

    LogBlock is working and it's using mysql too.
  11. Offline


    this seems to still not pick up a death event when using GhostBuster. damn.

    edit - nevermind i am a moron. thanks for update!
  12. Offline


    I don't know if this was taken out on purpose but what happened to the chat letter stat?
  13. Offline


    do i need mysql? if not, how do i create achievements + stats is working.. i does not collect any data
  14. Offline


    Nidefawl, you are awesome, I'll give it a testing :)
  15. Offline


    please help me
  16. Offline


    I would check your mysql settings, right database, username, table, etc.

    Nide, I'm having a derp issue with the changes, so I think I'm doing this wrong:

    1:BeenWarned:1:blockcreate:89:9999:You've been warned/suspended at least once.
    1:VeteranUpgrade:1:!BeenWarned;stats:playedfor:126000:Vet upgrade:group veteran
    1:VIP+:1:group vip;group veteran:1:VIP + Veteran Status:group vip+
    From what I can tell in the documentation, this how it should be, but I wasn't sure on the formatting. The first 2 achievements take just fine. The 3rd one errors out with following:

    2011-03-25 17:14:14 [SEVERE] [Achievements-0.9] Exception while reading achievements.txt (1:VIP+:1:group vip;group veteran:1:VIP + Veteran Status:group vip+): java.lang.NumberFormatException: For input string: "VIP + Veteran Status"

    This happens if I have the 1 in there or nothing. If I drop that field I get this:

    2011-03-25 17:17:48 [SEVERE] [Achievements-0.9] Malformed line, not enough fields (1:VIP+:1:group vip;group veteran:VIP + Veteran Status:group vip+) in achievements.txt

    So I seem to be missing something obvious I think.

    Thanks again for the help

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


    wokka, it could be the + sign.
  18. Offline


    I updated the wiki
    maybe this helps you:
  19. Offline


    It's still doesn't working.
    Any ideas?
  20. Offline


    Hi, I have a kinda weird problem, Achievements isn't seeing Permissions, but stats is.
    I'm running CB 556
    Permissions 2.5.4
    Stats 0.9
    Achievements 0.9

    This is what I get when I reload the server (amongst other code) :

    2011-03-26 14:47:14 [INFO] [Permissions] version [2.5.4] (Phoenix) was Initialized.
    2011-03-26 14:47:14 [INFO] [Permissions] version [2.5.4] (Phoenix)  loaded
    2011-03-26 14:47:19 [INFO] [Stats-0.9] Using Nijis Permissions for permissions
    2011-03-26 14:47:19 [INFO] [Stats-0.9] Plugin Enabled
    2011-03-26 14:47:19 [INFO] [Achievements-0.9] Found required plugin: Stats
    2011-03-26 14:47:19 [INFO] [Achievements-0.9] Found supported plugin: CraftIRC
    2011-03-26 14:47:19 [INFO] [Achievements-0.9] loaded 102 achievements definitions
    2011-03-26 14:47:19 [INFO] [Achievements-0.9] Achievements 0.9 Plugin Enabled
    And this is what I get when someone gets an achievement where they rank up:

    2011-03-26 14:44:37 [SEVERE] [Achievements-0.9] group command failed: This server does not use Permissions.
    How can I fix this?
  21. Offline


    actually i'm not crazy. player kills aren't registering. it seems to still count as a death on the dying party, but not a player kill for the killing party. using GhostBuster for deathban, which i was hoping wouldn't interfere anymore. any suggestions?
  22. Offline


    If I use flatfile to save player achievement, Achievement plugin do discreminate upper case & lower case.. but stats not.

    Player, pLayer, plAyer, playEr, playeR are different players in achivement.

    so player can recieve rewards five times in offline server.

    Use mysql to save playerachivement.
  23. Offline


    Most internal ArrayLists in both plugins user the players lower case name. You should only have one player with the name 'player'

    I guess a lot of other plugins will fail in this case.

    Achievements does not yet work with the latest Permissions-Plugin
    This message comes up when the permissions.yml in plugin/Permissions/ is not found
    Permissions uses world names in the newest version (plugin/Permissions/<world>/)

    It tried to fix it by lowering the onDeathEvent-Priority in Stats, os the Stats-onDeath is called before the GhostBusters onDeath event.
    I did some testing with DeathBan back then, and it worked.
    The real fix: GhostBusters/DeathBan should not kick players in the onDeathEvent. It should schedeule the kick for the next server-tick
    What happens is: others Plugins onDeath gets called with and empty/offline Player.
  24. Offline


    I am getting a malformed line error as well, anyone notice any issues? My assumption is something in the achievements.txt file is disrupting the formatting for the plugin.

    16:10:42 [INFO] [Stats-0.9] Using Nijis Permissions for permissions
    16:10:42 [INFO] [Stats-0.9] Plugin Enabled
    16:10:42 [INFO] [Achievements-0.9] Found required plugin: Stats
    16:10:42 [SEVERE] [Achievements-0.9] Malformed line, does not start with 0 or 1
    (check whitspaces) (1:Using Your Noggin:1:blockcreate:redstonedust:500:Awarde
    d for placing five hundred redstone wire:item diamondhelmet 1) in achievements.t
    16:10:42 [INFO] [Achievements-0.9] loaded 25 achievements definitions
    16:10:42 [INFO] [Achievements-0.9] Achievements 0.9 Plugin Enabled

    1:Using Your Noggin:1:blockcreate:redstonedust:500:Awarded for placing five hundred redstone wire:item diamondhelmet 1
    1:Adventures of Lewis and Clark:1:stats:move:13000001:Awarded for traveling over 13 million blocks:item diamondboots 1;money 5000
    1:Right near da beach, Boy-eeee!:1:blockdestroy:sand:200:What part of Jamaica?:item reed 3
    1:Is that Gold?:1:blockdestroy:goldore:1:Awarded for mining one gold:item goldbar 1
    1:Gold Digger:50:blockdestroy:goldore:50:Awarded for mining fifty gold:item goldbar 5;Is that Gold?
    1:Diamond at Last!:1:blockdestroy:diamondore:1:Awarded for mining one diamond:item diamond 5
    1:Lumberjack:1:blockdestroy:log:150:Awarded for harvesting 150 logs:item chest 4
    1:Lumberjack II:1:blockdestroy:log:500:Awarded for harvesting 500 logs:item sapling 25;money 500
    1:Lumberjack III:1:blockdestroy:log:1000:Awarded for harvesting 1000 logs:item sapling 50;money 1000
    1:First Times are the Hardest:1:stats:login:1:First time logging in at TheUberServer:money 1000
    1:Glutton for Punishment:1:stats:login:10:Awarded for logging in ten times:item goldenapple 1
    1:Lightstone:1:blockcreate:lightstone:10:I like it too:item lightstone 10
    1:Hmm...I've stopped liking the idea:1:blockdestroy:bookshelf:4:Not sure why though...:item bookshelf 4
    1:Slimes? lol:1:itempickup:slimeorb:5:Useless:item slimeorb 5
    1:If only I had a record:1:blockcreate:jukebox:1:Well...:item greenrecord 1
    1:You gonna eat that?:1:itempickup:pork:50:You might need this:item coal 64
    1:50k Walker!:1:stats:move:50000:You have walked 50,000 feet!:item diamondchestplate 1
    1:100 Grand:1:stats:move:100000:You have walked 100,000 feet!:item diamond 10
    1:200k Steps:1:stats:move:200000:You have walked 200,000 feet! WOW...:item glass 200
    1:ONE MILLION FEET:1:stats:move:1000000:You have walked 1,000,000 feet! You are God.:item diamond 64
    1:It was lag:1:deaths:total:50:Die a lot:item ironboots 1
    1:You really talk way too fucking much:1:stats:chatletters:40000:Awarded for typing 40k chat letters!:item diamondpants 1
    1:Ubers Most wanted:1:kills:total:250: Kill 250 monsters :item diamond 15
    1:I kill shit:1:damagedealt:total:2000: Deal 2000 damage:item arrow 200
    1:Now thats Hot:1:damagetaken:lava:1:Take lava damage:item waterbucket 1
    1:I like to fry:1:damagetaken:fire:500: Catch on fire numerous times:item snowblock 10
  25. Offline


    Ok, so this should work then:
    1:VIPVET:1:stats:playedfor:126000:VIP Veteran Status:group vipvet:group vip;VeteranUpgrade;!BeenWarned;group !admin;group !mods;group !default;group !op

    would promote to vipvet group, if they are in group vip, have the veteran upgrade achieve, but don't have the BeenWarned achieve, and not in the other groups.

    It seems to be warning the group vip requirement.

    However, this works as intended:
    1:ReadRules:1:itemdrop:woodaxe:1:You agreed to the rules.:group builder:group default
  26. Offline


    Any good way to check if a user is in the default GroupManager group for an achievement? The default group doesn't put them in users.yml, so I can't do a 'group' check, unless I do !group for every other group.
  27. Offline


    group default seems to work as a requirement, because if you do a /manwhois <player> and it shows the group: default
  28. Offline


    My default group is called "Guest", but if I put "group Guest" as an achievement condition, it doesn't work. Guests won't get the achievement.

    My achievements are as follows:
    1:User Upgrade:1:stats:playedfor:3600:Upgraded to User:/manuadd * User:group Guest
    1:Regular Upgrade:1:stats:playedfor:36000:Upgraded to Regular:/manuadd * Regular:group User
    1:Veteran Upgrade:1:stats:playedfor:172800:Upgraded to Veteran:/manuadd * Veteran:group Regular
    The regular and veteran upgrade work, but Guests will NEVER get the first achievement.

    Just tried it again and it worked. Wat. [creeper]

    No, I spoke too soon...I set my own group to Guest, ran /checkach and it gave me all three achivements. However, some people were in the server for well over 3600 seconds (1 hour), and never got the achievement while being in the default "Guest" group.

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


    Hy, can i change the command /stats for statistic ? cose im using mcmmo plugin, there already are the /stats command :/ and im realy whant use your plugin ( no better for statistic) . Thanks for reply
  30. Offline



    I am running CB 556 with S&A v0.9. After I updated to version .9 it gave all my users their achievements again - now when you complete an achievement it gives you it twice - and the reward twice. Any ideas?

    Thanks for the great pluggin.
  31. Offline


    Derp. I figured out my issue. Guests weren't checked for achievements, so of course they weren't getting the achievement.

Share This Page