Moved from MCStats to bStats (much better)

This commit is contained in:
Jaime Martinez Rincon 2017-01-21 13:23:10 +01:00
parent 28c2b06aab
commit d9ecff0ddd
3 changed files with 10 additions and 4 deletions

View File

@ -28,7 +28,7 @@ public class LobbyBalancer extends Plugin {
public static final String USER_ID = "%%__USER__%%";
public static final String RESOURCE_ID = "%%__RESOURCE__%%";
public static final String NONCE_ID = "%%__NONCE__%%";
private static final int LAST_VER_CONFIG_UPDATE = 20300;
private static final int LAST_VER_CONFIG_UPDATE = 20600;
private final Gson gson = new Gson();
private boolean failed = false;
@ -50,10 +50,12 @@ public class LobbyBalancer extends Plugin {
factory.submit(ConfigEntries.class);
}
//Metrics (https://bstats.org/)
new Metrics(this);
this.enable();
if (ConfigEntries.SUBMIT_STATS.get()) {
//Metrics (https://bstats.org/)
new Metrics(this);
}
}
private void enable() {

View File

@ -11,6 +11,7 @@ public class ConfigEntries implements ConfigEntryHolder {
public static final ConfigEntry<Boolean> PLUGIN_ENABLED = new ConfigEntry<>(0, "settings.enabled", false);
public static final ConfigEntry<Boolean> SILENT_STARTUP = new ConfigEntry<>(0, "settings.silent-startup", false);
public static final ConfigEntry<Boolean> CHECK_UPDATES_ENABLED = new ConfigEntry<>(0, "settings.check-updates", true);
public static final ConfigEntry<Boolean> SUBMIT_STATS = new ConfigEntry<>(0, "settings.submit-stats", true);
public static final ConfigEntry<Boolean> SERVER_CHECK_ENABLED = new ConfigEntry<>(0, "settings.server_check.enabled", true);
public static final ConfigEntry<String> SERVER_CHECK_MODE = new ConfigEntry<>(0, "settings.server_check.tactic", "CUSTOM");

View File

@ -23,6 +23,9 @@ settings:
# Whether the plugin should ask you to update or not
check-updates: true
# Disable this to opt-out of the plugin sending stats
submit-stats: true
# Pings to the servers to see if they can be accessed or not
server-check:
# If this is disabled the players will connect to the first server available