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.
@ray73864
Thank you, if you need any additional info please contact me.
The error seems to happen to all of the players on my server.
@GlabbichRulz
Have a new version in the works which will hopefully squash that particular bug, it's complaining because of a second single quote at the end of your name, not sure where it is getting it from, but i've rewritten the entire SQL code to pretty much squash that at the source.
Should be up in the next couple of days i'm hoping.
Hi, found a bug :)
I know that but for my server website i really need this plugin.
I wanna create player list (already did that) so i wanna add information about that if player is online
@KrustyLv
If that's all you need, why don't you enable the Minecraft Query Protocol on your game? Using that, you can gain access to all the players who are currently online on your server, but that's the only information you will be able to get from them.
Just make a plugin that records all players in database and in other row is it online or offline.
Thats all what i need.
Thanks.
@KrustyLv
Still trying to work out where exactly the issue is coming from, i can't work out why it is happening.
So will need to think of a better way, it does seem to only occur in windows though.
Fix it please
Why this plugin is so buggy :(
http://prntscr.com/2rixgm
@Toxxic3D
Is this the only plugin you use which uses SQL?
@KrustyLv
Can you provide the full error please, as it provides more info as to the location of the problem.
Error again: You have error in your syntax; check the manual that corresponds to your MYSQL server version for the right syntax to use near 'KrustyLv'' at line 1
In the most updated version the 'online' column is bugged, it only displays one or two people being online, when there are 10 or so. It doesn't go higher than two. I have refreshed the database multiple times, still doesn't display the right number.
Am I the only one with this issue?
I'm friends with Ivey (a few days ago posted an error), and we have updated to the new update.
The only issue we are having now (which was occurring with the last build you had for 1.4.6) is the lag on joining. Whenever ANYONE joins into our server (45 slots) (could happen with only 1 person on) we get a lag spike. We have used timings and has shown to be from your plugin.
http://aikar.co/timings.php?url=6901338
Hope to see you update this. If not we will have to change since it is really bad.
@KrustyLv
Yeah, first login time is a weird one, i've never been able to figure out why it doesn't work, it's almost like the name of the method doesn't match what it does.
As for disabling them, why disable? you could just always ignore those fields in the database table instead.
Works fine.
Is there is a way to disable logon time, logout time and first login?
Btw first login dont work
@KrustyLv
Please test with this new version here, should hopefully fix the problems:
http://dev.bukkit.org/media/files/772/373/OnlinePlayersSQL.v1.9.3.jar
Please fix
This error:
http://prntscr.com/2qmjww