mirror of https://github.com/tomasff/BeesPlus.git
Added language metric
This commit is contained in:
parent
791f69a19d
commit
edc0b47982
|
@ -20,6 +20,7 @@ import org.bukkit.plugin.java.JavaPlugin;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.Locale;
|
import java.util.Locale;
|
||||||
|
import java.util.concurrent.Callable;
|
||||||
|
|
||||||
public class BeesPlus extends JavaPlugin {
|
public class BeesPlus extends JavaPlugin {
|
||||||
|
|
||||||
|
@ -44,8 +45,7 @@ public class BeesPlus extends JavaPlugin {
|
||||||
}
|
}
|
||||||
|
|
||||||
registerItems();
|
registerItems();
|
||||||
|
setupMetrics();
|
||||||
Metrics metrics = new Metrics(this, 7065);
|
|
||||||
|
|
||||||
new UpdateChecker(this, 77224).getVersion(version -> {
|
new UpdateChecker(this, 77224).getVersion(version -> {
|
||||||
if (!this.getDescription().getVersion().equalsIgnoreCase(version)) {
|
if (!this.getDescription().getVersion().equalsIgnoreCase(version)) {
|
||||||
|
@ -54,6 +54,13 @@ public class BeesPlus extends JavaPlugin {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void setupMetrics() {
|
||||||
|
Metrics metrics = new Metrics(this, 7065);
|
||||||
|
|
||||||
|
metrics.addCustomChart(new Metrics.SimplePie("language_used",
|
||||||
|
() -> getConfig().getString("locale", Locale.ENGLISH.toLanguageTag())));
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onDisable() {
|
public void onDisable() {
|
||||||
guiViewTracker.clearViews();
|
guiViewTracker.clearViews();
|
||||||
|
|
Loading…
Reference in New Issue