PlaytimeV2
PlayTimeV2 Simple plugin to count time played by your player New release for people using or not playtime. (Completely rewriting),new function like afk implementation and ability to see the time played since last death.
Requirement
Java 7 and mysql database
Installation
- Download correct version
- Put jar to your plugin folders
- Start server
- Configure config.yml
- Restart Server
Configuration
//set to true or false AfkEnable: true //time to check afk (in second) AfkTime : 300 //top length min and max adjust if necessary TopTenMin: 5 TopTenMax: 30 //set to true or false ResetOnDeath: true //Configure correct information host: ipaddress or name databasename: nameofdb username: username password: yourpassword //if you use playtime just use Name: playtime tables: Playtime: Name: playtimeV2 collums: Username: username Playtime: playtime //if you need quote(') inside just put double quote('') //minecraft colors are available (&1,&2....) ErrorTopTen: '&cInvalid use of command!' ErrorTopTenRange: '&cSpecify player number (between 5 and 30)' NoPerm: '&cYou don''t have permission for this command!' NoPermOther: '&cYou don''t have permission to see other player''s time.' SeePersonnalTime: '&2%player%,&6 You have played &2%time% so far.' SeeOtherPlayer: '&2%player%&6 has played &2%time% untill now.' SeePersonnalTimeDeath: '&2%player%&6,you have played &2%time% &6since your last death on &2%lastdeath%.' SeeOtherPlayerDeath: '&2%player% &6has played &2%time% &6since his last death on &2%lastdeath%.' NeverDeath: '&2Your last death is unknown' NeverDeathOver: '&2The last death of this player is unknown!!' PlayerNotExist: '&cThis player doesn''t exist.' ResetOnDeathMsg: '&6Your play time has been reset.' LessOneMn: 'Less than one minute' TopTen: '&6Top %value% result:' --> V0.4 version TopTenMsg: '&2%player% &6has played &2%time%.' --> V0.3 version IsAfkTrue: '&cYou are now AFK, your game time is not counted anymore.' IsAfkFalse: '&2You aren''t AFK, your game time is counted.'
For french user (Pour les utilisateurs francais)
//mettre true ou false pour activer l'afk AfkEnable: true //temps en seconde pour etre afk AfkTime : 300 //longeur mini et max du top ajuster si nécessaire. TopTenMin: 5 TopTenMax: 30 //mettrre true ou false pour reset le temps en cas de mort. ResetOnDeath: true //Mettre les bonnes informations host: ipaddress or name databasename: nameofdb username: username password: yourpassword tables: Playtime: //si vous utilisez playtime ancienne version, il suffit de mettre 'Name: playtime Name: playtimeV2 collums: Username: username Playtime: playtime //Si vous avez besoin d'apostrophes (') il suffit de les doubler ('') //Les codes couleurs sont utilisables (&1,&2....) NoPerm: '&cVous n''êtes pas autorisé à faire cela.' NoPermOther: '&cVous ne pouvez pas voir le temps de jeu des autres joueurs.' SeePersonnalTime: '&2%player%, &6vous avez joué &2%time% &6depuis le 25/11/2012.' SeeOtherPlayer: '&6Le joueur &2%player% &6a joué &2%time% &6depuis le 25/11/2012.' TopTen: '&6Top %value% résultat:' TopTenMsg: '&6Le joueur &2%player% &6a joué &2%time%.' SeePersonnalTimeDeath: '&2%player%&6,vous avez jouez &2%time% &6depuis votre dernière mort le &2%lastdeath%.' SeeOtherPlayerDeath: '&2%player% &6a joué &2%time% &6depuis sa dernière mort le &2%lastdeath%.' NeverDeath: '&2Votre dernière mort est inconnu !' NeverDeathOver: '&2La dernière mort de ce joueur est inconnu !!' PlayerNotExist: '&cCe joueur n''existe pas.' ResetOnDeathMsg: '&6Votre temps de jeu a été réinitialisé.' LessOneMn: 'moins d''une minute.' IsAfkTrue: '&cVous êtes désormais AFK, votre temps de jeu n''est plus compté.' IsAfkFalse: '&2Vous n''êtes plus AFK, votre temps de jeu est de nouveau compté.'
Commands
- /playtime To see you personal time of play
- /playtime <Player> To see the time of play for this player
- /playtimedeath To see you personal time of play since last death
- /playtimedeath <Player> To see the time of play for this player since last death
- /playtimetop To see the top ten
- /playtimetop <value> To see specific lenght top
Permissions
permissions:
- playtime.count The permission to count playtime.
- playtime.see.* The star permission to all playtime.see permission (not for count)
- playtime.see The permission to see your personnal time of play.
- playtime.see.other The permission to see time of play for over player.
- playtime.see.top The permission to see top ten
- playtime.see.other.death The permission to see time of play for over player since last death.
- playtime.see.death The permission to see your over time of play since last death
- playtime.afk.exempt: The permission to are exempt of afk.
- playtime.deathreset.exempt The permission to are exempt for reset on death.
Features
- Real API
- Flat-file support
For DEV
Soon....
Congratulation
A big thanks for Josvth for helping me make this plugin (http://dev.bukkit.org/profiles/josvth/)
Server using PlayTimeV2
Laucher available at desticraft.fr or desticraft.com (Needed for specific server like pvp)
- Freebuild French : freebuild.desticraft.fr
- Creative French : creatif.desticraft.fr
- PVP French : pvp.desticraft.fr
- Skyblock French : skyblock.desticraft.fr
- Freebuild US : freebuild.desticraft.com
- Creative US: creative.desticraft.com
Other server open from time to time
- Survival french: survival.desticraft.fr
- Survival US: survival.desticraft.com
Can this plugin be used if you dont set the database? I dont have a database and when I type /playtime nothing happens...
New version 0.5
@zimko95
when would you release an update? Couse the error is flooding my logs really badly :(
@romenas
I have think same about death time and full time :) I'll code that later.
@zimko95
Thank you very much, ill be waiting for a fix :) Nice job with this plugin, also i have an idea for improvement, do not erase the time but make it calculate like this:
TIME played - one table column TIME last death - second column Time played - last death = play time (until death) Then you will have "Time played" from begining and "Time played" from last death.
Thank you :)
@romenas
Yes it's a part of my code. I resolve for next version.
BUG:
When using commandsigns(http://dev.bukkit.org/server-mods/command-signs/files/28-v1-8-7/), somebody push on sign which does not event use PlayTime... I dont know why this plugin reaction is like this, but...
[SEVERE] Could not pass event PlayerCommandPreprocessEvent to PlayTimeV2 v0.4 org.bukkit.event.EventException at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:427) at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62) at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:477) at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:462) at org.zonedabone.commandsigns.handlers.CommandHandler.run(CommandHandler.java:109) at org.zonedabone.commandsigns.handlers.CommandHandler.handle(CommandHandler.java:79) at org.zonedabone.commandsigns.CommandSignExecutor.runLines(CommandSignExecutor.java:224) at org.zonedabone.commandsigns.CommandSignsClickHandler.onInteract(CommandSignsClickHandler.java:157) at org.zonedabone.commandsigns.CommandSignsEventListener.onPlayerInteract(CommandSignsEventListener.java:54) at sun.reflect.GeneratedMethodAccessor34.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:425) at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62) at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:477) at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:462) at org.bukkit.craftbukkit.v1_4_6.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:178) at net.minecraft.server.v1_4_6.PlayerInteractManager.interact(PlayerInteractManager.java:376) at net.minecraft.server.v1_4_6.PlayerConnection.a(PlayerConnection.java:656) at net.minecraft.server.v1_4_6.Packet15Place.handle(SourceFile:58) at net.minecraft.server.v1_4_6.NetworkManager.b(NetworkManager.java:290) at net.minecraft.server.v1_4_6.PlayerConnection.d(PlayerConnection.java:112) at net.minecraft.server.v1_4_6.ServerConnection.b(SourceFile:39) at net.minecraft.server.v1_4_6.DedicatedServerConnection.b(SourceFile:30) at net.minecraft.server.v1_4_6.MinecraftServer.r(MinecraftServer.java:585) at net.minecraft.server.v1_4_6.DedicatedServer.r(DedicatedServer.java:224) at net.minecraft.server.v1_4_6.MinecraftServer.q(MinecraftServer.java:481) at net.minecraft.server.v1_4_6.MinecraftServer.run(MinecraftServer.java:416) at net.minecraft.server.v1_4_6.ThreadServerApplication.run(SourceFile:849) Caused by: java.lang.NullPointerException at com.zimko.PlayTimeV2.PlayTimeV2.GetIsAfk(PlayTimeV2.java:119) at com.zimko.PlayTimeV2.PlayTimeV2.onPlayerCommand(PlayTimeV2.java:173) at sun.reflect.GeneratedMethodAccessor165.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:425) ... 28 more
@ZwingGX
Already implemented. /playtimetop, /playtimetop <number of result needed>
@ZwingGX
Desticraft server use groupmanager, work fine with last version of gm, don't forgotten add permission 'playtime.count' for the player you need count time.
i found bug. permissions doesn't work.
only op players work.
just Sorry you are not allowed to see this. message.
my server use the GroupManager
Please add rank :)
example: type /playtimetop
1. player1have played 10m.
2. player1have played 9m.
3. player1have played 8m.
4. player1have played 7m. ...
@xtheudis
The English is better... try this:
I did some corrections to the English and French language files.
PlaytimeV2 0.4 release:
@TheLazeboy
Post error please
@rudolf323
If you put incorrect value in yml file, file is reset
@rudolf323
I'm french XD, English and me by moment .... but thank's :) and remember : '' is needed by yml file ^^
@ChargingKelson
It's compatible tekkit but permission system is needed.
@deleted_8591593
make a playtimetop <value> yes it's possible, for over release, i check what's wrong now, because you ave the real top ten but not sort correctly (??)
I get an internal server error with the commands. :( Help?
after /reload all config file is reseted
You have some mistakes in messages..
You don''t are afk = You are not(aren't) AFK
your time of game not any more counted. = Your playtime is not counted anymore. or Your time of game is not counted anymore
Does this work for tekkit? if so please tell me.. If not can you make a tekkit version? Thanks! and keep up with the excellent plugin!
I like it! Would you like some help with the English in the config? Also would it be possible to sort the /playtimetop by the actual playtime? (sort by highest to lowest playtime) Right now I think its just sorted by who was on first. Also being able select the number of top results that are displayed. i.e. /playtimetop 20 shows the top 20. Thanks!
No the systeme of afk is independent.