SuperStats
SuperStats is a plugin that collects data from different plugins on different servers to a database, and then is displayed in a menu on any server with a menu.
Placeholders Collected
What information you collect from the plugins. This add-on will collect the following placeholder.
SuperStats:Placeholders Collected
Installation
- Copy the JAR file in the directory of plugins
- Restart the server to install.
- (Optional) Install the Web Addon ✪ SuperStats ✪ Web Addon
- To display data on the web page
- And enjoy the plugin!.
Tutorial
- Install the plugin on all servers
- Configure the servers where you want to collect data (example: SkyWars, PVP, SkyBlock)
- Configure the stats according to the installed plugin and the data to collect (Example: in the SkyWars server I configure the stats of a SkyWars plugin)
- To configure the stats of a plugin fence to the stats folder and edit the configuration that has the name of the plugin. Set hook to true and the identifiers to use to true. (Example: kill = true, score = true)
- Set up on the lobby server with the same database as the other servers and have access to all placeholders of the plugins installed on another server.
Commands
Commands | Permissions | Info |
---|---|---|
/stats | superstats.use | Displays the statistics menu |
/statsreload | superstats.admin | to reload the configuration |
Commands
Permissions | Info |
---|---|
superstats.use | To use the stats command |
superstats.admin | To use the statsreload command |
Api
This guide will show you how to register your own placeholders from your plugin.
Create a register class
public class Example_Stats extends StatsHook {
public Example_Stats(JavaPlugin plugin) {
//super(plugin,false,Name for the plugin configuration,List of data to collect)
super(plugin,false,"Example_Stats",Arrays.asList("example1","example2"));
}
@Override
public String onStatsRequest(Player paramPlayer, String stats) {
if (paramPlayer == null) {
return null;
}
if(stats.equals("example1")){
return String.valueOf("Example Stats 1");
}
if(stats.equals("example2")){
return String.valueOf("Example Stats 2");
}
return null;
}
@Override
public String getIdentifier() {
// TODO Auto-generated method stub
return "example";
}
}
Register the class in the onEnable ()
public void onEnable(){
//SuperStats.registerPlaceholderStats(The class that collects the data);
SuperStats.registerPlaceholderStats(new Example_Stats(this));
}
The variables that register are.
- example_example1
- example_example2