Load Metrics only if it is set to true in config

This commit is contained in:
Florian CUNY 2018-08-30 23:34:13 +02:00
parent 3c00247eda
commit 9b9031a009

View File

@ -85,9 +85,6 @@ public class BentoBox extends JavaPlugin {
// Start head getter
headGetter = new HeadGetter(this);
// Load metrics
BStats bStats = new BStats(this);
// Load Notifier
notifier = new Notifier();
@ -132,8 +129,11 @@ public class BentoBox extends JavaPlugin {
instance.log("- Tastybento and Poslovitch, 2017-2018");
instance.log("#############################################");
// Register metrics
bStats.registerMetrics();
// Load metrics
if (settings.isMetrics()) {
BStats bStats = new BStats(this);
bStats.registerMetrics();
}
// Fire plugin ready event
Bukkit.getServer().getPluginManager().callEvent(new BentoBoxReadyEvent());