forked from mirror/BlueMap
Fix bstats implementation
This commit is contained in:
parent
0fad4abca2
commit
199fb77a18
@ -85,7 +85,7 @@ public BukkitPlugin() {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onEnable() {
|
public void onEnable() {
|
||||||
new MetricsLite(this);
|
new MetricsLite(this, 5912);
|
||||||
|
|
||||||
//save world so the level.dat is present on new worlds
|
//save world so the level.dat is present on new worlds
|
||||||
Logger.global.logInfo("Saving all worlds once, to make sure the level.dat is present...");
|
Logger.global.logInfo("Saving all worlds once, to make sure the level.dat is present...");
|
||||||
|
@ -75,10 +75,6 @@ public class SpongePlugin implements ServerInterface {
|
|||||||
@ConfigDir(sharedRoot = false)
|
@ConfigDir(sharedRoot = false)
|
||||||
private Path configurationDir;
|
private Path configurationDir;
|
||||||
|
|
||||||
@SuppressWarnings("unused")
|
|
||||||
@Inject
|
|
||||||
private MetricsLite2 metrics;
|
|
||||||
|
|
||||||
private Plugin pluginInstance;
|
private Plugin pluginInstance;
|
||||||
private SpongeCommands commands;
|
private SpongeCommands commands;
|
||||||
|
|
||||||
@ -89,7 +85,7 @@ public class SpongePlugin implements ServerInterface {
|
|||||||
private List<SpongePlayer> onlinePlayerList;
|
private List<SpongePlayer> onlinePlayerList;
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
public SpongePlugin(org.slf4j.Logger logger) {
|
public SpongePlugin(org.slf4j.Logger logger, MetricsLite2.Factory bstatsFactory) {
|
||||||
Logger.global = new Slf4jLogger(logger);
|
Logger.global = new Slf4jLogger(logger);
|
||||||
|
|
||||||
this.onlinePlayerMap = new ConcurrentHashMap<>();
|
this.onlinePlayerMap = new ConcurrentHashMap<>();
|
||||||
@ -97,6 +93,9 @@ public SpongePlugin(org.slf4j.Logger logger) {
|
|||||||
|
|
||||||
this.pluginInstance = new Plugin("sponge", this);
|
this.pluginInstance = new Plugin("sponge", this);
|
||||||
this.commands = new SpongeCommands(pluginInstance);
|
this.commands = new SpongeCommands(pluginInstance);
|
||||||
|
|
||||||
|
//init bstats metrics
|
||||||
|
bstatsFactory.make(5911);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Listener
|
@Listener
|
||||||
|
Loading…
Reference in New Issue
Block a user