mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-06-25 02:04:44 +02:00
bstats
This commit is contained in:
@ -245,6 +245,8 @@ public class Config extends AutoUpdateConfigLoader {
|
||||
|
||||
/* General Settings */
|
||||
|
||||
public boolean getIsMetricsEnabled() { return config.getBoolean("Metrics.bstats", true); }
|
||||
|
||||
//Retro mode will default the value to true if the config file doesn't contain the entry (server is from a previous mcMMO install)
|
||||
public boolean getIsRetroMode() { return config.getBoolean("General.RetroMode.Enabled", true); }
|
||||
|
||||
|
@ -44,6 +44,7 @@ import com.gmail.nossr50.util.scoreboards.ScoreboardManager;
|
||||
import com.gmail.nossr50.util.upgrade.UpgradeManager;
|
||||
import com.google.common.base.Charsets;
|
||||
import net.shatteredlands.shatt.backup.ZipLibrary;
|
||||
import org.bstats.bukkit.Metrics;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.HandlerList;
|
||||
@ -179,6 +180,20 @@ public class mcMMO extends JavaPlugin {
|
||||
if (Config.getInstance().getPTPCommandWorldPermissions()) {
|
||||
Permissions.generateWorldTeleportPermissions();
|
||||
}
|
||||
|
||||
//If anonymous statistics are enabled then use them
|
||||
|
||||
Metrics metrics;
|
||||
|
||||
if(Config.getInstance().getIsMetricsEnabled()) {
|
||||
metrics = new Metrics(this);
|
||||
metrics.addCustomChart(new Metrics.SimplePie("version", () -> getDescription().getVersion()));
|
||||
|
||||
if(Config.getInstance().getIsRetroMode())
|
||||
metrics.addCustomChart(new Metrics.SimplePie("scaling", () -> "Standard"));
|
||||
else
|
||||
metrics.addCustomChart(new Metrics.SimplePie("scaling", () -> "Retro"));
|
||||
}
|
||||
}
|
||||
catch (Throwable t) {
|
||||
getLogger().severe("There was an error while enabling mcMMO!");
|
||||
|
Reference in New Issue
Block a user