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