mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-25 14:46:46 +01:00
bstats
This commit is contained in:
parent
12af9af902
commit
f1feeed670
15
pom.xml
15
pom.xml
@ -87,6 +87,7 @@
|
|||||||
<include>commons-logging:commons-logging</include>
|
<include>commons-logging:commons-logging</include>
|
||||||
<include>org.apache.tomcat:tomcat-jdbc</include>
|
<include>org.apache.tomcat:tomcat-jdbc</include>
|
||||||
<include>org.apache.tomcat:tomcat-juli</include>
|
<include>org.apache.tomcat:tomcat-juli</include>
|
||||||
|
<include>org.bstats:bstats-bukkit</include>
|
||||||
</includes>
|
</includes>
|
||||||
</artifactSet>
|
</artifactSet>
|
||||||
<relocations>
|
<relocations>
|
||||||
@ -102,6 +103,10 @@
|
|||||||
<pattern>org.apache.tomcat</pattern>
|
<pattern>org.apache.tomcat</pattern>
|
||||||
<shadedPattern>com.gmail.nossr50.database.tomcat</shadedPattern>
|
<shadedPattern>com.gmail.nossr50.database.tomcat</shadedPattern>
|
||||||
</relocation>
|
</relocation>
|
||||||
|
<relocation>
|
||||||
|
<pattern>org.bstats</pattern>
|
||||||
|
<shadedPattern>com.gmail.nossr50.metrics.bstat</shadedPattern>
|
||||||
|
</relocation>
|
||||||
</relocations>
|
</relocations>
|
||||||
</configuration>
|
</configuration>
|
||||||
<executions>
|
<executions>
|
||||||
@ -127,8 +132,18 @@
|
|||||||
<id>spigot-repo</id>
|
<id>spigot-repo</id>
|
||||||
<url>https://hub.spigotmc.org/nexus/content/repositories/snapshots/</url>
|
<url>https://hub.spigotmc.org/nexus/content/repositories/snapshots/</url>
|
||||||
</repository>
|
</repository>
|
||||||
|
<repository>
|
||||||
|
<id>CodeMC</id>
|
||||||
|
<url>https://repo.codemc.org/repository/maven-public</url>
|
||||||
|
</repository>
|
||||||
</repositories>
|
</repositories>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.bstats</groupId>
|
||||||
|
<artifactId>bstats-bukkit</artifactId>
|
||||||
|
<version>1.4</version>
|
||||||
|
<scope>compile</scope>
|
||||||
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.spigotmc</groupId>
|
<groupId>org.spigotmc</groupId>
|
||||||
<artifactId>spigot-api</artifactId>
|
<artifactId>spigot-api</artifactId>
|
||||||
|
@ -245,6 +245,8 @@ public class Config extends AutoUpdateConfigLoader {
|
|||||||
|
|
||||||
/* General Settings */
|
/* General Settings */
|
||||||
|
|
||||||
|
public boolean getIsMetricsEnabled() { return config.getBoolean("Metrics.bstats", true); }
|
||||||
|
|
||||||
//Retro mode will default the value to true if the config file doesn't contain the entry (server is from a previous mcMMO install)
|
//Retro mode will default the value to true if the config file doesn't contain the entry (server is from a previous mcMMO install)
|
||||||
public boolean getIsRetroMode() { return config.getBoolean("General.RetroMode.Enabled", true); }
|
public boolean getIsRetroMode() { return config.getBoolean("General.RetroMode.Enabled", true); }
|
||||||
|
|
||||||
|
@ -44,6 +44,7 @@ import com.gmail.nossr50.util.scoreboards.ScoreboardManager;
|
|||||||
import com.gmail.nossr50.util.upgrade.UpgradeManager;
|
import com.gmail.nossr50.util.upgrade.UpgradeManager;
|
||||||
import com.google.common.base.Charsets;
|
import com.google.common.base.Charsets;
|
||||||
import net.shatteredlands.shatt.backup.ZipLibrary;
|
import net.shatteredlands.shatt.backup.ZipLibrary;
|
||||||
|
import org.bstats.bukkit.Metrics;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.event.HandlerList;
|
import org.bukkit.event.HandlerList;
|
||||||
@ -179,6 +180,20 @@ public class mcMMO extends JavaPlugin {
|
|||||||
if (Config.getInstance().getPTPCommandWorldPermissions()) {
|
if (Config.getInstance().getPTPCommandWorldPermissions()) {
|
||||||
Permissions.generateWorldTeleportPermissions();
|
Permissions.generateWorldTeleportPermissions();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//If anonymous statistics are enabled then use them
|
||||||
|
|
||||||
|
Metrics metrics;
|
||||||
|
|
||||||
|
if(Config.getInstance().getIsMetricsEnabled()) {
|
||||||
|
metrics = new Metrics(this);
|
||||||
|
metrics.addCustomChart(new Metrics.SimplePie("version", () -> getDescription().getVersion()));
|
||||||
|
|
||||||
|
if(Config.getInstance().getIsRetroMode())
|
||||||
|
metrics.addCustomChart(new Metrics.SimplePie("scaling", () -> "Standard"));
|
||||||
|
else
|
||||||
|
metrics.addCustomChart(new Metrics.SimplePie("scaling", () -> "Retro"));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
catch (Throwable t) {
|
catch (Throwable t) {
|
||||||
getLogger().severe("There was an error while enabling mcMMO!");
|
getLogger().severe("There was an error while enabling mcMMO!");
|
||||||
|
@ -13,6 +13,9 @@
|
|||||||
#
|
#
|
||||||
# Settings for the Skills
|
# Settings for the Skills
|
||||||
###
|
###
|
||||||
|
# Enables anonymous statistics
|
||||||
|
Metrics:
|
||||||
|
bstats: true
|
||||||
Feedback:
|
Feedback:
|
||||||
# If sendtitles is true messages will be sent using the title api (BIG TEXT ON SCREEN)
|
# If sendtitles is true messages will be sent using the title api (BIG TEXT ON SCREEN)
|
||||||
Events:
|
Events:
|
||||||
|
Loading…
Reference in New Issue
Block a user