Merge branch 'mc/1.13' into mc/1.15

This commit is contained in:
Blue (Lukas Rieger) 2020-07-30 17:20:32 +02:00
commit d172c159d9
3 changed files with 17 additions and 1 deletions

View File

@ -2,6 +2,7 @@ name: BlueMap
description: "A 3d-map of your Minecraft worlds view-able in your browser using three.js (WebGL)"
main: de.bluecolored.bluemap.bukkit.BukkitPlugin
version: ${version}
api-version: 1.13
author: "Blue (TBlueF / Lukas Rieger)"
website: "https://github.com/BlueMap-Minecraft"
commands:

View File

@ -1,5 +1,5 @@
dependencies {
shadow "org.spongepowered:spongeapi:7.1.0-SNAPSHOT"
shadow "org.spongepowered:spongeapi:7.2.0"
compile group: 'org.bstats', name: 'bstats-sponge-lite', version: '1.5'
compile (project(':BlueMapCommon')) {

View File

@ -39,7 +39,9 @@
import org.spongepowered.api.event.game.GameReloadEvent;
import org.spongepowered.api.event.game.state.GameStartingServerEvent;
import org.spongepowered.api.event.game.state.GameStoppingEvent;
import org.spongepowered.api.plugin.PluginContainer;
import org.spongepowered.api.scheduler.SpongeExecutorService;
import org.spongepowered.api.util.Tristate;
import org.spongepowered.api.world.World;
import org.spongepowered.api.world.storage.WorldProperties;
@ -161,4 +163,17 @@ public File getConfigFolder() {
return configurationDir.toFile();
}
@Override
public boolean isMetricsEnabled(boolean configValue) {
PluginContainer pluginContainer = Sponge.getPluginManager().fromInstance(this).orElse(null);
if (pluginContainer != null) {
Tristate metricsEnabled = Sponge.getMetricsConfigManager().getCollectionState(pluginContainer);
if (metricsEnabled != Tristate.UNDEFINED) {
return metricsEnabled == Tristate.TRUE ? true : false;
}
}
return Sponge.getMetricsConfigManager().getGlobalCollectionState().asBoolean();
}
}