OnlinePlayersSQL
Description
This plugin will update a MySQL database table with a list of players as the join and disconnect from your game.
Originally created for the MCAddictGallery server, it was created so that we could have a live player listing on our website with minimal of fuss.
Currently the plugin tracks the following information:
- Player Name
- Previous World (used for when a player warps from one world to another)
- Current World (the current world the player is in)
- IP Address
- Logon Time (stored as seconds since epoch)
- Players permission group
- Flag to say whether the player is online or not.
Required Plugins to use this one
- Vault
Optional Plugins that provide extra features
- SimplyVanish - Not required, but if you want the players list to not show vanished players, then you will likely want this.
Configuration
config.yml
MySQLServer: localhost MySQLPort: '3306' MySQLUsername: <username for db> MySQLPassword: <password for db> MySQLDatabase: <database to use> MySQLTable: <table to use> showDebug: true|false op_only_resync: true|false
eg.
MySQLServer: localhost MySQLPort: '3306' MySQLUsername: player_tracker MySQLPassword: fred123 MySQLDatabase: player_tracker MySQLTable: online_players showDebug: false op_only_resync: false
This plugin will check to see if the necessary table exists in 'MySQLDatabase' and if it doesn't, it will create it.
showDebug will put debug information in the console allowing you to follow along what the plugin does when a player connects/disconnects.
op_only_resync determins if only ops can use '/onl resync' or not.
An example php file can be found here: http://dev.bukkit.org/server-mods/online-players-sql/pages/example-php-file/
It should work just fine, though you will need to change values where necessary for your mysql logon information.
Information about each function used can naturally be found at the php.net website.
Really nice plugin guy !!!
Infos : work on 1.4.2, doesn't work on 1.4.5
Can we give you some donations ?
Have a nice day.
Do you plan to remove the sync dependency? If not where can I find the source so I can fix it myself?
@fungreenfox
what? how is that even possible?
I completely found the jar file deleted after using whitelist for maintenance.
@GlabbichRulz
That's rather odd, hrmm. I wonder why it would, i mean, unless the whitelist temporarilly lets the player join before it kicks them for not being whitelisted, might have to test this.
@ray73864
Everything is working fine again. It was the Whitelist which "confused" your plugin
@GlabbichRulz
How did you make the backup? I've found that bukkit plugins behave very flakey when the MySQL database server disappears for a moment.
Did you try stopping and starting your game?
Hmm, I had to make a database backup yesterday and now im getting this error while joining: http://pastie.org/5053672 and when leaving: http://pastie.org/5053664
EDIT: This happens just while having whitelist enabled.
@GlabbichRulz
Hrmm, that is a strange one. I imagine i'm not extracting it from bukkit correctly then. Need to install the java sdk onto my new computer before i can do much at this stage though.
Hi, permissions switching whith worlds works fine without any errors, the 2 colums are directly created after installation and the logout time is directly added when logging off.
Works Great!
EDIT: First Login is always "NULL"
New version posted, waiting on approval.
I have marked the new version as Beta since i haven't tested it, but it should work just fine.
In this version, 2 new columns and i have fixed up the internal version number.
- last_logout column
- first_login
'first_login' will only get updated for new players at this stage, when i have the time to look deeper i will see if i can find a way to update it for all players.
I kinda never expected this many people to even use this plugin, it was just something i created in my spare time for our server, thankyou for all your support, very much appreciated.
@bjornleijdstrom
Not yet, sorry, been busy this weekend.
Hi again man; sorry for posting here, but have you looked into the "last logout-time" yet? (:
Could people please post their suggestions/bugs on the ticket tracker, that way i have an easy way of remembering what i need to look at / add.
I work during the week and work a different job for a couple of hours on the weekend. Love my job, programmer during the week, IT tech for a primary school on the weekend.
Only downside is that i tend to forget some things :(
ok, i have uploaded a new version that takes care of changing the permissions group each time the player changes worlds.
I have no way of testing this on my server since we don't use per-world groups.
@GlabbichRulz
ahh, sorry. I get a bit sidetracked when i'm in the groove doing work related stuff.
Will do that right now.
@ray73864
No, it should update the permissions group when switching worlds, I already suggested this before, i am just waiting :)
@GlabbichRulz
Strange, it should already be doing that, which part of it isn't working?
There are 2 fields in the SQL table dealing with the world, 1 stores what world they were previously in, the other stores what world they are now in.
Could you please make an Update so it also updates when switching worlds?
@Jason0123
It gets updated each time the player logs on. So the time it has is their current logon session time.