Inactive [INFO/WEB] Netstats v5.0.4 - Keeps track of player playtime and online status [RB 1.1-R3]

Discussion in 'Inactive/Unsupported Plugins' started by Valrix, Feb 13, 2011.

  1. Offline


    Netstats v5:
    Keep up with development in BukkitDev!
    Netstats - Player Monitoring Plugin:
    Plugin Version: v5.0
    Web Version: v3.0

    Netstats watches players as they join and leave the server and keeps track of how long they've been logged into the server as well as keeping track of their current online/offline status while using very little system resources. The information is stored in a database which is defined by the user. First time using Netstats it will create the config file then disable itself until you change the config to match your database. Then you can reload or restart the server and it'll start collecting information immediately.
    Source Code: Netstats

    OLD CHANGELOG (open)

    Version 4.7
    • Bug fixes
    • If you don't supply a "database" in the config it will attempt to make it's own database named "NetStats" then create the table "netstats" inside it.
    • Fixed repetitive code and unnecessary MySQL connections when doing multiple queries one-after-another (reduces database calls, speeds up the code, and uses less resources).
    • Reduced code complexity (simplified certain calls and removed hacky functions to improve code performance by around 5-10% in my tests)
    Version 4.6
    • Fixed the bug that happened when trying to change the name of your stats table.
    • Fixed the bug that messed up everyone's total play time (sorry)
    • Code improvements and uses less code for database calls
    Version 4.5
    • Fixed the bug where folders weren't being made.
    Version 4.4
    • Converts the total play time to be saved as seconds instead of milliseconds to increase maximum play time. This will now match the PHP code, so if you changed it, change it back.
    • Now disables and re-enables itself instead of reloading the server when doing a wipe
    • Some code improvements
    Version 4.3
    • No longer requires the /lib/ folder since CB already contains the needed drivers
    • v5 is close to being ready and will bring large speed improvements
    Version 4.2
    • Fixes the bug that creates .stats folders instead of files.
    Version 4.1
    • Many code improvements to improve speed and memory usage.
    • Thanks to @jascotty2 for the code to fix how player and mob kills are handled
    Version 4.0
    • Many bug fixes
    • Changed how total play time was saved to the database
    • Fixed a bug with timed events
    • A new and improved Web update is nearly finished
    Version 3.9
    • Should work with RB 617
    Version 3.8
    • Fixed an issue with how files were handled.
    Version 3.7
    • Fixes issue of logged-in users being shown as offline after a reload
    • Fixed file creation bug where .stat files weren't being made properly
    Version 3.6
    • Fixed a bug where, depending on your region, your IP address was logged twice in the database. This was more of an issue with how the IP address was being grabbed than a problem with how it was stored.
    • Few other small fixes to prevent possible future bugs.
    Version 3.5
    • Changed how paths are managed by the plugin to be more OS-independent, hopefully fixing all "file not found" errors.
    • Removed checking if a database password exists or not.
    Version 3.4
    • Improved error logger that create a special log file with the exact info I'll need to find out what caused the problem.
    • Numerous bug fixes and speed tweaks
    Version 3.3
    • Added tracking of distance traveled
    • Added tracking of number of monsters a player has killed
    • Added tracking of number of other players a player has killed
    • Added the date of when the player first joined the server (after this version of Netstats has been installed, will only be correct after a full wipe of other stats)
    • Database will auto-build if it doesn't exist, otherwise it'll add columns if they're needed (so you don't have to do anything to update your database)
    • Config file now auto-updates and allows for comments (they need their own line however)
    • Many other code improvements and fixes to help it run faster and more efficiently.
    Version 3.2
    • Fixed the problem with saving to the database that everyone's been getting. (Only need the JAR)
    Version 3.1
    • Changed the namespace to com.sparkedia.valrix since I did the Java bit.
    Version 3.0
    • Rebuild of v1 to be more efficient.
    • Customized tracking based on "true" or "false"
    • What you don't want tracked won't be watched which improves performance
    • Timed updates (default is 90 seconds)
    • Fixed updating based on total actions user has done (default is 32)
    • Numerous performance tweaks
    • A "pretty" config file
    • Improved web script performance and added customized tracking (make it match your main config, variables are named the same for simplicity)
    • Web view tells when a player is still online and makes their name green if online, red if offline
    • Uses the "hybrid" method of player data saving like v1 to put less strain on the database
    • When saving to a database it is done dynamically so that only changed things are saved to cut down on the code needed and make smaller, faster calls to the database when saving (this was a big improvement on all previous versions)
    • Table name has been changed to "netstats" to not conflict with any other tables
    • NOTICE: You will need to remove your old data since it is outdated and the table is named differently with a few field name changes so make sure to use the .sql file to add it to your database. Please, before complaining about losing all the old data, realize that there's a 99% chance that it's wrong.
    Version 2.0
    • Complete revamp!
    • Now uses only flatfiles to store data, no more database issues!
    • Lots of code removed and improved for faster speed and less resource use
    • Customizable timed updates (default is every 30 seconds)
    • Customized tracking also reduces resource use by registering (or not registering) events as per your config so it only watches events that you want it to.
    • Web script will search for your CraftBukkit server when you first look at the web page.
    • You can choose where the server will save every player's .stats file by setting the "path" option in the config. The path is relative to your main server folder (where the world folder should be at). So if you set "path=../players/" then the .stats files will be in a folder called "players" in the folder that your server is in.
    • Table of player data is built depending on what your tracking and will change as you change the Netstats config file, nice and easy!
    • There are a few rules to setting paths that are listed above, make sure to read them!
    Version 1.8
    • Various code fixes and changes to improve how it runs.
    • Creates a new blank config file if it can't find one.
    • Only JAR has been changed. Get the newest one above, which I'll just reference from now on since it's faster than posting the same link over and over again.
    Version 1.7
    • Changed how files are accessed which should fix the "Too many files open" bug on Linux machines. Update the [JAR]
    Version 1.6
    • Hopefully fixed bug with connecting multiple times to a property file for each user. Only [JAR] needs updating.
    Version 1.5
    • Fixed a critical bug where user property files (where it saved your data before moving it to the database) wasn't re-defined when the plugin was reloaded. Now it looks for it after everything you do to make sure your data is always being recorded. Only the [JAR] needs to be updated.
    Version 1.4
    • Updated the files to work with the new constructor. You'll need only the [JAR] for this update.
    Version 1.3
    • Fixed a bug with how the plugin saves user data after a server crash
    • Added an Update.sql to add new columns to database table [] (only for those upgrading from v1.2)
    Version 1.2
    • Added tracking of blocks broken
    • Added tracking of blocks placed
    • Added tracking of player deaths
    • Added more frequent tracking of total time online
    • Implemented new "safety" storage system
    • New storage system reduces number of database calls
    • Improved the way data is stored to database to take less code
    • The table of data is now ordered by who is online
    Version 1.1
    • Added tracking of player's last used IP address
    Version 1.0
    • Release of Netstats
    WEB CHANGELOG (open)

    Version 2.1
    • Some code cleanup and fixes as well as a better auto-updater that makes sure that the updater is the latest version before doing the actual update process.
    • Localization support for 7 different languages.
    • File name changes to be more netstats-specific which will prevent clashes of CSS and other pages.
    • Better include() and require() calls so a page is only added once which speeds up all the pages and keeps them from destroying each other.
    Version 2.0
    • Improved layout
    • Automatic code updates
    Version 1.0
    • Initial release of web code

    Donations: Don't forget to give amd3th some love too since he helped in making Netstats and came up with the idea (you rock!) as well as @marshall007 since he's been awesome by helping me in his spare time.
    Phaedrus, Niemand, D-Lew and 5 others like this.
  2. Offline


    Ah, cool. Well if its any help, as soon as I see version 5 come out I will install that one! :D Keep up the epic work Valrix, epic developers make this community a better place. *claps*
  3. Offline


    Thank ye ^^
  4. Offline


    Haha I love how you're accepting bitcoins for donations... thats pretty cool man.
    Your plugins sick I'm so psyched for v5 - wish I could help
  5. Offline


    Yeah I'm the owner. :)

    Gotcha buddy, thanks! Can't wait to have this plugin. I've been working on a new UI for my portal, so I'll be following this closely!

    Thanks again!

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


    Your site design is really slick. Props.
  7. Offline


    The data in MySQL is not 'live', that is, every time you break a block, Netstats isn't pushing that data to the database. Instead, it writes it to a file, and then offloads all online players' data from the files to MySQL on whatever interval you set in the config. Updating the database on each blockbreak, meter walked, etc, would be far too slow.
  8. Offline


    Can't wait for V5 to get out!
    This plug is great, keep up the good work @Valrix :)
  9. Offline


    Thanks for the words of support, I'm still working hard on it to make it awesome for everyone. This update was a bit bigger than I first thought, haha.
  10. Offline


    Sounds great!
    As long as it's for the new build of Bukkit I'll be more than happy! :)
  11. Offline


    See that's the kind of thing I wish was in the OP so I didn't download and install it before getting to page 36 only to read the author slamming it and saying it not only lags a server but he doesn't care about supporting it. Just... wow.
  12. Offline


    The OP says that the next version is in the works. Depending on your server, it won't lag it much, but for others it does which is due to the database connection stuff taking up a lot of memory and not having optimized code like v5 will have. I'm still supporting all my plugins, but v4 is considered "broken" due to it not calculating total play time correctly for some reason. So, instead I'm telling people to wait until v5 is ready and everything will work better and no longer needs a database at all.
  13. Offline


  14. Offline


    Haha, I'm workin hard on it. Tomorrow I have no plans so I'll have all day to work on it. I'm glad real life is finally giving me a short break so I can get some work done. *slightly frustrated*
    Freakdk and Schlumpfpirat like this.
  15. Offline


    are you still working on V5?
    i really want to use this but i see that you are no longer supporting it
    what the ETA?
  16. Offline


    I invite you to reconsider this decision.

    The php code included with this plugin, which is currently 404ing on this post, has the following in it (from an earlier download on 05/03):

    # Auto-update the web code for you
    $update = *0;
    Is that true or false? Or a syntax error, or what?

    Because I am a little unnerved...

    When I opened "updateManager.php" which is part of the Web portion of your zip, has code that downloads and runs itself. The code in question refers to:
    $ftp ftp_connect("");
    if (


    $loc "";


    # Update the old updater then run it.
    But if you visit the website, references above:

    You get a rather suspicious smiley face.

    And if you login via the FTP site, using the credentials from the ftp site, you get nothing but an index file containing said smiley face, and another directory that says "/You should fix your security :".


    That's my emoticon in response to the one I get from the website.

    Is it just me, or is this one step away from malware? I am hoping that that update option is defaulting to false, because I think that perhaps an auto-updating php page, controlled remotely by a forgotten, ftp server by a developer uninterested in supporting old code is pretty damn dangerous.
  17. Offline


    When I try to load the page, it tells me "Failed to unzip the PHP update.".

    Anyone know how to fix this?

  18. Offline


    Looks like the PHP coders website got hacked. Turn off the auto update feature.
  19. Download and run a file is Verry dangerus
  20. Offline


    I had a nice few paragraphs typed up for you to read, but taking the time to type it out allowed me to settle down a bit. Yes, it's a syntax error. Automated updates are not currently supported. The packaged PHP scripts aren't even mandatory to run the server plugin. You could write your own, snip out what you don't like, etc. The project is entirely open source. Go have a look through the code on GitHub if you're that concerned. Providing legacy support is absurd especially on a platform developing as fast as Bukkit.

    The most obvious answer: this thread has over 1k replies and the version in question is nearly two months old. The likelihood that you're the first to notice is slim.
  21. Offline


    Interesting, it did indeed get hacked. Well, luckily nothing of great importance was there...v5 is still being worked on and @marshall007 is actually helping with the project and made a great amount of progress in my stead. Currently I have family problems going on which I won't go into detail about, but it's keeping me from currently getting any work done. Marshall's work is highly appreciated and is making v5 even better than it was going to be.
  22. Offline


    It appears there's a file missing called netstats.sql? Anyone have this?
  23. Offline


    It's not missing. The plugin creates the table on first run. If it's not created; you have not set the sql permissions correctly.

    Also, I advice you to read the notice almost on top of the page by the plugin author.
  24. Offline


    sorry to hear about the family issues
    im sure that when i say this everyone on here will agree with me
    we are all patiently awaiting the V5 distro :D
  25. Offline


    Just found this and waiting for v5. In the meantime, can anyone provide the last version? The link is 404'd. Thanks!
  26. Offline


    Very excited for V5 :)
  27. Offline


    v5 is progressing better now with @marshall007's help and once I have a stable internet connection I can properly get work done since I can't sync the repo. As it is, I'm trying to work off my phone and move it back and forth to my computer so I can continue work. Though it's harder than I first though. I'll keep you updated though. If you want instant answers, talk to me on Twitter since I'm always connected to that
    Schlumpfpirat likes this.
  28. Offline


    Go! Stop reading this! Go code! :] d:
  29. Offline


    Hello it would be nice if this didn't require a Web DB and you could just type /played to see how much a person has played and all information is stored in the Netstats folder, Hope you look at this, Thanks :)
  30. Offline


    I'm hoping he's coding instead of looking here... :p
  31. Offline


    *sigh* v5?
    Oscarius likes this.

Share This Page