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
@gmcferrin
In the config.yml
Players:
<NAME>:
<DATA1>:
<DATA2>:
ect.
The first and last seen times are stored in a special time format. your better of using the commands as it converts it to understandable time and date
@mbl111: Fair enough. How does this store the data, by the way?
@gmcferrin
Uh, not too sure how i would impliment this.
Could you add the ability to somehow track connection time over an interval? So you could check someone's activity from the last week, month, etc?
@Latusy
I can put the message displaying how long they played. but the AFK thing, Im not too sure
Is there a way you can display how many hours they've logged on the server when they sign in?
"Welcome &PLAYER, you have played x hours on this server".
Also, I use Essentials, which puts players into AFK mode after x minutes. Any way you could set it so that it stops counting play hours when a player goes into AFK?
@silencshadow
About the search function i will have a look into that. it does seem like a good thing to have.
with the IP logging that is interesting. I shall have to look at that to
Hey Guy, can u log the ip upon FIRST login?! not if he logout or relog, dont know how u coded it ... i need to see the IP if a player joins the first time ... :S anyway i realy like it :D
Edit: it would nice if u build in a search ip function! with xxx.xxx.*.* ... so i can check if user XYZ the same user is like ZYX and maybe a hint with "User xxx is the same user like xxx" (with phrase :D and variables %user1 %user2 )
like i got a griefer, ban him, he rejoin with a new nick ... i can /pstats ip search <IP/user> and get a list of users with that ip but searched with 123.123.*.* .... so if he restart router i can catch him with his range ip ... :S
Plz give me a reply :D
@BearFather
Thats really odd. Keep on eye on it and tell me i it happens again
Awesome plugin, gonna try it. And post any errors if there are any :D
Ive been trying out this plugin, got it loaded up and running with no problems. But then after a few days(noticed at 77hrs running), it stop responding to commands. When I issued a command(pstats playtime bearfather), it would not send any response to console or myself. No errors. Tried both from client and console. After a restart worked just fine.
Web page? Like ye old Statistician?
Im also having a problem with this plugin not logging playtime. A persons play time always comes back as 0.0
@Dhozerr
Hmm, strange. I shall try and find the problem. Hopefully its nothing to hard to fix
I have had it installed for about a week now and still everyone except for me has 0.0 hours played. And the funny thing is other people are the same rank as me as well, so I'm not really sure what the problem is. Everyone on the server also has the same permission for playerstats as i have.
@Dhozerr
It registers it only when the player leaves. So it wont show up unless they log out
@Dhozerr
So it only tracks your time as Op. I think i know why that may be so dont worry that will be fixed. I may make the /ps configurable so it can be made to what ever prefix your want (i.e /noodles firstseen) Im not 100% sure how to do this but i can look into it
I didn't see a forum listed for support but I am having a minor problem I was hoping to get help with. I loaded the plugin on my server with no problems and no errors in consol. It built the config file for different members who have logged in since implementation, however if you use the command to find their playtime everyone says 0.0 hours played. The only exception is for me and it only recorded time while i was OP. Everyone has the playerstats.* permission. Any ideas how I can get the playtime to track ?
I am also having the problem with preciousstones. /ps is used with precious stones and you cannot simply use /player because precious stones will not recognize the /ps command while playerstats is plugged in.
Any help would be appreciated, and if there is a seperate support forum I'd be happy to post there if I missed the link to it?
@Mike724
This has only been a recent error because it has worked before. I will look into it (like right now)
EDIT-Fixed
I get this error when logging out:
2011-12-10 22:13:55 [SEVERE] Could not pass event PLAYER_QUIT to Playerstats
java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.Long
at me.mbl111.Playerstats.listeners.Players.quit(Players.java:115)
at me.mbl111.Playerstats.listeners.Players.onPlayerQuit(Players.java:39)
at org.bukkit.plugin.java.JavaPluginLoader$2.execute(JavaPluginLoader.java:267)
at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:58)
at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:339)
at net.minecraft.server.ServerConfigurationManager.disconnect(ServerConfigurationManager.java:161)
at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:650)
at net.minecraft.server.NetworkManager.b(NetworkManager.java:231)
at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:92)
at net.minecraft.server.NetworkListenThread.a(SourceFile:108)
at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:521)
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:419)
at net.minecraft.server.ThreadServerApplication.run(SourceFile:457)