mirror of
https://github.com/AuthMe/AuthMeReloaded.git
synced 2024-11-24 11:15:19 +01:00
custom graphs
This commit is contained in:
parent
3567fc909d
commit
41bbbf0a96
@ -23,6 +23,7 @@ import org.bukkit.plugin.RegisteredServiceProvider;
|
|||||||
import org.bukkit.plugin.java.JavaPlugin;
|
import org.bukkit.plugin.java.JavaPlugin;
|
||||||
import org.bukkit.scheduler.BukkitTask;
|
import org.bukkit.scheduler.BukkitTask;
|
||||||
import org.mcstats.Metrics;
|
import org.mcstats.Metrics;
|
||||||
|
import org.mcstats.Metrics.Graph;
|
||||||
|
|
||||||
import com.earth2me.essentials.Essentials;
|
import com.earth2me.essentials.Essentials;
|
||||||
import com.onarandombox.MultiverseCore.MultiverseCore;
|
import com.onarandombox.MultiverseCore.MultiverseCore;
|
||||||
@ -162,6 +163,25 @@ public class AuthMe extends JavaPlugin {
|
|||||||
// Start the metrics service
|
// Start the metrics service
|
||||||
try {
|
try {
|
||||||
Metrics metrics = new Metrics(this);
|
Metrics metrics = new Metrics(this);
|
||||||
|
Graph messagesLanguage = metrics.createGraph("Messages language");
|
||||||
|
Graph databaseBackend = metrics.createGraph("Database backend");
|
||||||
|
|
||||||
|
// Custom graphs
|
||||||
|
if(Settings.messageFile.exists()) {
|
||||||
|
messagesLanguage.addPlotter(new Metrics.Plotter(Settings.messagesLanguage) {
|
||||||
|
@Override
|
||||||
|
public int getValue() {
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
databaseBackend.addPlotter(new Metrics.Plotter(Settings.getDataSource.toString()) {
|
||||||
|
@Override
|
||||||
|
public int getValue() {
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
metrics.start();
|
metrics.start();
|
||||||
ConsoleLogger.info("Metrics started successfully!");
|
ConsoleLogger.info("Metrics started successfully!");
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
Loading…
Reference in New Issue
Block a user