Merge branch '4.0_dev' of https://github.com/zDevelopers/ImageOnMap into 4.0_dev

This commit is contained in:
valentin 2020-06-06 22:32:43 +02:00
commit 89123da386
2 changed files with 11 additions and 4 deletions

View File

@ -107,12 +107,18 @@ public final class ImageOnMap extends ZPlugin
Commands.registerShortcut("maptool", NewCommand.class, "tomap");
Commands.registerShortcut("maptool", ExploreCommand.class, "maps");
UpdateChecker.boot("imageonmap.26585");
if (PluginConfiguration.CHECK_FOR_UPDATES.get())
{
UpdateChecker.boot("imageonmap.26585");
}
final Metrics metrics = new Metrics(this);
if (PluginConfiguration.COLLECT_DATA.get())
{
final Metrics metrics = new Metrics(this);
metrics.addCustomChart(new Metrics.SingleLineChart("rendered-images", MapManager::getImagesCount));
metrics.addCustomChart(new Metrics.SingleLineChart("used-minecraft-maps", MapManager::getMapCount));
metrics.addCustomChart(new Metrics.SingleLineChart("rendered-images", MapManager::getImagesCount));
metrics.addCustomChart(new Metrics.SingleLineChart("used-minecraft-maps", MapManager::getMapCount));
}
}
@Override

View File

@ -31,6 +31,7 @@ public final class PluginConfiguration extends Configuration
static public ConfigurationItem<Locale> LANG = item("lang", Locale.class);
static public ConfigurationItem<Boolean> COLLECT_DATA = item("collect-data", true);
static public ConfigurationItem<Boolean> CHECK_FOR_UPDATES = item("check-for-updates", true);
static public ConfigurationItem<Integer> MAP_GLOBAL_LIMIT = item("map-global-limit", 0, "Limit-map-by-server");
static public ConfigurationItem<Integer> MAP_PLAYER_LIMIT = item("map-player-limit", 0, "Limit-map-by-player");