Playerstats
Playerstats - Track player stats like, IP, Last seen, First seen
Version: v1.9
ALL NEW VERSION OF PLAYERSTATS!!! NOW IT ACTUALLY WORKS!!!
This is a simple plugin designed to track player statistics to help with admin work. It records players individual data and allows it to be called up in game with commands.. It is my first plugin with permissions support that I have released.
Features:
Logs First and Last seen
Logs IP
Logs last position when the player logged out
Logs how many times the player has logged in to the server
Custom first join messages with colour support!! (now also standard MC colours are available)
Tells the user what the error is if the log doesn't have the required information
Uses Bukkit Permissions!!
Simple command structure!
Console support!
/ps info <name> is now /ps report <name>
Commands:
Quote:/pstats or /playerstats - Commands can be prefixed with either of these, but i will be using /ps in the command description for simplicity. This command just brings up a chat message with the Plugin name, version and author
/pstats ? - Displays in game help.
/pstats firstseen <name> - Displays the first seen data for the player <name>
/pstats lastseen <name> - Displays the last seen data for the player <name>
/pstats seen <name> - Displays the first and last seen data for the player <name>
/pstats seen <name> - Displays the first and last seen data for the player <name>
/pstats ip <name> - Displays the IP address of the player <name>
/pstats lastpos <name> - Displays the last position of the player <name>
/pstats playtime <name> - How long they have actually played (online) on the server.
/pstats activity <name> - Shows as a percentage how active they are (Playtime/Total Time)
/pstats totaltime <name> - Displays the time the player has been on the server (Time from first seen to last seen, not play time)
/pstats flag - Shows the help for the /ps flag <name> command. (what the flags mean)
/pstats flag <name> - Displays the current flag for the player
/pstats logons <name> - Shows how many times the player has logged on
/pstats report <name> - Displays an info sheet with all the data collected of the player. (Players can do this command about themselves without the permission node)
/pstats updatecheck - Checks to see if there is an update.
/pstats update - Updates the plugin (Server must be reloaded to apply the changes) This Command is Vanilla OP + Console only.
/pstats reload - reloads the config
First Join message Macros
Quote:They support the default minecraft colours. Found here -> http://i.imgur.com/h3CIU.png
Or these ones below.
&AQUA;
&BLACK;
&BLUE;
&DARK_AQUA;
&DARK_BLUE;
&DARK_GRAY;
&DARK_GREEN;
&DARK_PURPLE;
&DARK_RED;
&GOLD;
&GRAY;
&GREEN;
&LIGHT_PURPLE;
&RED;
&WHITE;
&YELLOW;
&PLAYER; (This is where the players name would appear)Example:
"&b Welcome &RED; &PLAYER; &b to the server"this would put the players name (Represented by &PLAYER;) in red. with "Welcome" and "to the server" in aqua (&b)
Permissions
Quote:Permissions are per command.
- No permission for - /pstats, /playerstats, /pstats ?, /pstats report (on themselves)
- playerstats.* - All permissions (yes it works i coded it in)
- playerstats.seen.firstseen - /pstats firstseen
- playerstats.seen.lastseen - /pstats lastseen
- playerstats.seen.seen - /pstats seen
- playerstats.info.ip - /pstats ip
- playerstats.info.lastpos - /pstats lastpos
- playerstats.info.totaltime - /pstats totaltime
- playerstats.info.playtime - /pstats playtime
- playerstats.info.activity - /pstats activity
- playerstats.info.flag - /pstats flag
- playerstats.info.all - /pstats report
- playerstats.info.logons - /pstats logons
- playerstats.reload - /pstats reload
Change log
This will be with the latest file to download
Please note that this plugin submits basic data back to my central database with information such as server name and Ip
Future Changes
- Add Block statistics like; Blocks broken, Placed ect.
- Fight Statistics.
- Kills - Mobs (types of mobs), Players, Weapons - Bow, Sword, Axe, pick Other (Will include weapon type i.e. Stone Sword).
- Deaths - from mobs(Types of mobs), from players. Weapons used to be killed (grouping as above)
- Fight Stats will also allow for things like Kill/death ratio. Player Skill ect.
- Allow players to be listed depending on their flag (I.e list of black flagged people to know who has been away for more than 2 months)
- A command to 'archive' black listed people so that they don't clog up the list, but their details are still there in case they want to log on again
with MCPZ
does this plugin work with 1.6.4?
i just got this and im about to make a server
@mbl111
Sweet, I knew it was using unix timestamp but my brain couldn't get it to come out right. I suck at math. That's what computers are for:)
@BearFather
So, basically its stored using the milliseconds since January 1970. (The standard time log for computing). Thus to get it to hours you need to divide it by 3600000.
ms / 1000 = seconds seconds / 60 = minutes minutes / 60 = hours
Glad to hear that its all working for you :D
Also, this will still work with 1.4.7 and 1.5 (etc.) as no errors seem to popup in my code on the editor. However there may be errors during runtime of this plugin.
I cannot understand your last time error as it checks for the values to all be there before it does things and therefore should not error
So been using this with the issues it has and learned that it works great, and all the info returns back to me as long as the players are online. So was gonna make a simple php query to pull the info from the table's when player's are offline. But trying to figure out the formula to calculate the online time you have stored. Any way you can help me there?
Best I got so far is this... Code:
Output:
and in game it shows 181 hours.
It would be good if a plugin like this could generate a file with the statistics of ALL players, eg. things like ip geolocation, ip, time spent.
This data could then be formulated into a graph to be analysed, and would be particularly useful in seeing where most people on the server come from, etc.
it tells me im missing the records when i use it
Looks awesome, compatible with 1.4.7?
please update to 1.4.7
I just did our yearly DB dump for playerstats, and my mod did a /lastpos <player>. And this showed up in our console. But playtime, and save works fine.
Every time I submit a command it gives me a missing record ever. What do I need to do to fix it?
when i do /pstats total time mikepancho it says 'missing the totaltimerecord' how do i fix that?
Sorry passed out not too long after that post. Doing a restart right now and same issue. Stopped after the [Playerstats] Submitting useage Data.
EDIT:
Actually it's been 7 min and still waiting for it to stop the server. So this is a worse issue. I had to force stop it to shutdown.
Checking startup, and it get's to that point and it shows messages about plugin's activity on the network and then waits. (see below)
EDIT2:
Just let it sit for 10 min and never cont on with loading. Hit Ctrl-c and it shutdown. Did a restart and it worked perfect. Scared to restart it:)
@BearFather
Could you give it one more try to see if its still there?
I had my self second guessing i installed it. But yesterday it was fine. Today went to restart the server after an SQL error and it started up again.
@BearFather
Wait what? Er... It shouldnt have
And of course today back to the same issue.
Finally got to replace this plugin and thank you so much. The pause is gone. I could kiss you right now.
@BearFather
Ok, I have looked in to these errors, and through some testing I am 98% sure this next update should fix them. Apart from that there are no other changes.