fix bstats
This commit is contained in:
parent
1b8fc3312a
commit
2bfddbee0d
2 changed files with 13 additions and 8 deletions
9
pom.xml
9
pom.xml
|
@ -40,11 +40,6 @@
|
||||||
<artifactId>jarupdater</artifactId>
|
<artifactId>jarupdater</artifactId>
|
||||||
<version>0.1.0</version>
|
<version>0.1.0</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
|
||||||
<groupId>eu.m724</groupId>
|
|
||||||
<artifactId>jarupdater</artifactId>
|
|
||||||
<version>0.1.0</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.bstats</groupId>
|
<groupId>org.bstats</groupId>
|
||||||
<artifactId>bstats-bukkit</artifactId>
|
<artifactId>bstats-bukkit</artifactId>
|
||||||
|
@ -84,14 +79,14 @@
|
||||||
<relocations>
|
<relocations>
|
||||||
<relocation>
|
<relocation>
|
||||||
<pattern>org.bstats</pattern>
|
<pattern>org.bstats</pattern>
|
||||||
<!-- Replace this with your package! -->
|
<shadedPattern>eu.m724.realweather.bstats</shadedPattern>
|
||||||
<shadedPattern>eu.m724.realweather</shadedPattern>
|
|
||||||
</relocation>
|
</relocation>
|
||||||
</relocations>
|
</relocations>
|
||||||
<artifactSet>
|
<artifactSet>
|
||||||
<includes>
|
<includes>
|
||||||
<include>eu.m724:wtapi</include>
|
<include>eu.m724:wtapi</include>
|
||||||
<include>eu.m724:jarupdater</include>
|
<include>eu.m724:jarupdater</include>
|
||||||
|
<include>org.bstats:*</include>
|
||||||
<!-- <include>org.java-websocket:Java-WebSocket</include> -->
|
<!-- <include>org.java-websocket:Java-WebSocket</include> -->
|
||||||
</includes>
|
</includes>
|
||||||
</artifactSet>
|
</artifactSet>
|
||||||
|
|
|
@ -7,6 +7,7 @@ import java.io.InputStreamReader;
|
||||||
import java.util.logging.Logger;
|
import java.util.logging.Logger;
|
||||||
|
|
||||||
import org.bstats.bukkit.Metrics;
|
import org.bstats.bukkit.Metrics;
|
||||||
|
import org.bstats.charts.SimplePie;
|
||||||
import org.bukkit.configuration.file.YamlConfiguration;
|
import org.bukkit.configuration.file.YamlConfiguration;
|
||||||
import org.bukkit.plugin.java.JavaPlugin;
|
import org.bukkit.plugin.java.JavaPlugin;
|
||||||
|
|
||||||
|
@ -140,7 +141,16 @@ public class RealWeatherPlugin extends JavaPlugin {
|
||||||
if (GlobalConstants.weatherConfig.enabled)
|
if (GlobalConstants.weatherConfig.enabled)
|
||||||
getCommand("localweather").setExecutor(new LocalWeatherCommand());
|
getCommand("localweather").setExecutor(new LocalWeatherCommand());
|
||||||
|
|
||||||
new Metrics(this, 15020);
|
Metrics metrics = new Metrics(this, 15020);
|
||||||
|
metrics.addCustomChart(new SimplePie("weather_provider", () ->
|
||||||
|
GlobalConstants.weatherConfig.enabled ? GlobalConstants.weatherConfig.provider : "off"
|
||||||
|
));
|
||||||
|
metrics.addCustomChart(new SimplePie("thunder_provider", () ->
|
||||||
|
GlobalConstants.thunderConfig.enabled ? GlobalConstants.thunderConfig.provider : "off"
|
||||||
|
));
|
||||||
|
metrics.addCustomChart(new SimplePie("real_time", () ->
|
||||||
|
GlobalConstants.timeConfig.enabled ? "on" : "off"
|
||||||
|
));
|
||||||
|
|
||||||
DebugLogger.info("ended loading", 1);
|
DebugLogger.info("ended loading", 1);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue