Hello! I have Logblock on my server (grief-rollback), which also logs time into my database. My question is: Would someone be so kind to create a plugin where you can type: /playtime [name], and it then connects with the database you setup in the config, use the database command: SELECT onlinetime FROM lb-players WHERE playername = '(Name variable given by the /playtime [name] command)'. As the onlinetime you will get is in seconds, something like the following: hours = 0; minutes = 0; seconds = 0; While (onlinetime-3600>=0) { hours++; onlinetime = onlinetime - 3600; } While (onlinetime-60>=0) { minutes++; onlinetime = onlinetime - 60; } While (onlinetime!=0) { seconds++; onlinetime = onlinetime - 1; } Then print in chat for the person that used the command: [Name] Has played for ?h ?m ?s Contact me for more information if you need it, and if you want to play on my server after creating this, you will get a 25$ donator rank :3
I think my plugin, Activity History can do this, but I cant recall because I haven't updated in a while. It has a lot more functions though and soon I'll be implementing SQL.
Please check out OnTime, it will do this and so much more. OnTime will do things that Logblock does not like removing time spent AFK. It is possible to do an import from the Logblock data file to seed the OnTime database so your players can get credit for their time so far. http://dev.bukkit.org/server-mods/ontime /http://dev.bukkit.org/server-mods/ontime/pages/other-functions/#w-import-from-the-logblock-plugin