mirror of
https://github.com/BlueMap-Minecraft/BlueMap.git
synced 2024-12-02 07:23:22 +01:00
Merge branch 'mc/1.13' into mc/1.15
This commit is contained in:
commit
d172c159d9
@ -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:
|
||||
|
@ -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