Add new commands to metrics
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
package me.libraryaddict.disguise.utilities.metrics;
|
||||
|
||||
import me.libraryaddict.disguise.utilities.DisguiseUtilities;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.configuration.file.YamlConfiguration;
|
||||
import org.bukkit.plugin.ServicePriority;
|
||||
@@ -89,8 +90,7 @@ public class Metrics {
|
||||
// Inform the server owners about bStats
|
||||
config.options()
|
||||
.header("bStats collects some data for plugin authors like how many servers are using their " +
|
||||
"plugins.\n" +
|
||||
"To honor their work, you should not disable it.\n" +
|
||||
"plugins.\n" + "To honor their work, you should not disable it.\n" +
|
||||
"This has nearly no effect on the server performance!\n" +
|
||||
"Check out https://bStats.org/ to learn more :)").copyDefaults(true);
|
||||
try {
|
||||
@@ -121,6 +121,8 @@ public class Metrics {
|
||||
// We are the first!
|
||||
startSubmitting();
|
||||
}
|
||||
} else {
|
||||
DisguiseUtilities.getLogger().info("The author sees Metrics disabled, the author is sad");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1027,6 +1029,5 @@ public class Metrics {
|
||||
public static Country byLocale(Locale locale) {
|
||||
return byIsoTag(locale.getCountry());
|
||||
}
|
||||
|
||||
}
|
||||
}
|
@@ -68,6 +68,27 @@ public class MetricsInitalizer {
|
||||
premiumType = "Free Builds";
|
||||
}
|
||||
|
||||
metrics.addCustomChart(new Metrics.SimplePie("grabskin_command") {
|
||||
@Override
|
||||
public String getValue() {
|
||||
return "" + DisguiseUtilities.isGrabSkinCommandUsed();
|
||||
}
|
||||
});
|
||||
|
||||
metrics.addCustomChart(new Metrics.SimplePie("save_disguise_command") {
|
||||
@Override
|
||||
public String getValue() {
|
||||
return "" + DisguiseUtilities.isSaveDisguiseCommandUsed();
|
||||
}
|
||||
});
|
||||
|
||||
metrics.addCustomChart(new Metrics.SimplePie("copydisguise_command") {
|
||||
@Override
|
||||
public String getValue() {
|
||||
return "" + DisguiseUtilities.isCopyDisguiseCommandUsed();
|
||||
}
|
||||
});
|
||||
|
||||
metrics.addCustomChart(new Metrics.SimplePie("premium") {
|
||||
@Override
|
||||
public String getValue() {
|
||||
|
Reference in New Issue
Block a user