mirror of
https://github.com/BlueMap-Minecraft/BlueMap.git
synced 2024-11-22 10:35:16 +01:00
Update SpongeAPI version to 7.2.0
This commit is contained in:
parent
7dbff21f40
commit
68f3205792
@ -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')) {
|
||||
|
@ -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();
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user