Client Stats

Client Stats [Removed]

The plugin is in beta. Please report any bugs in the discussion!
Want to run this on Bungee? Here you are!
Description
Did you ever asked yourself how many players joined your server since startup ? And what is the most used version ? The average playtime ? Then this plugin is what you need ![​IMG]To use version detection, your server has to accept multiple versions of Minecraft, but it’s not mandatory. To accept different versions, you can use one of these:
ViaVersion (use latest)
ProtocolSupport (use latest)
– Spigot protocol hack (1.7/1.8)[​IMG]

Installation
No configuration is needed, just drag and drop the file ClientStats.jar into your plugins folder. A config will be created, that you can edit to change all the messages as your needs.

Commands
The base command is /clientstats, but there are shorter alias: /cstats, /cs or /scs.

Command list:
/cstats stats – Statistics of the day
/cstats version – Versions of player who joined
/cstats online – Versions of currently online players
/cstats player [player] – Version of a player
/cstats reset – Reset tracked stats
/cstats reload – Reload configuration
/cstats – Display theses commands

Permissions
You only need the following permission to access to every commands of the plugin: clientstats.admin

Also, to be excluded from statistics, you need to have this permission: clientstats.exempt

But you can give only access to some parts with these permissions:
clientstats.cmd.stats
clientstats.cmd.version
clientstats.cmd.online
clientstats.cmd.player
clientstats.cmd.reset
clientstats.cmd.reload

Developper API
Use ClientStats API to access to stats, or get protocol/version name of a player. After adding ClientStats.jar to your build path, fetch API like that:

Code (Java):
// Get ClientStatsAPI
ClientStatsAPI cstats = ClientStats.getApi();
// Check if it is useable
if (cstats != null && cstats.isVersionDetectionEnabled()) {
// Get a player
Player p = Bukkit.getPlayer(“Notch”);
  // Get his protocol version (e.g.: 47)
int protocolVersion = cstats.getProtocol(p.getUniqueId());
    // Get the version name (e.g.: “1.8 – 1.8.9”)
  String versionName = cstats.getVersionName(protocolVersion);
}

See Github project for sources and API.

Bugs & suggestions
Do NOT use reviews for bugs or suggestions, but please post it in discussion with many details as needed :)
.

Leave a Reply

Your email address will not be published. Required fields are marked *

one × one =

Skip to toolbar