Skip to content

Commit

Permalink
ignore metrics for dev version
Browse files Browse the repository at this point in the history
  • Loading branch information
goodbyepavlyi committed Nov 30, 2024
1 parent 30e40ed commit 3eec2e0
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ public class LavaRiseInstance extends JavaPlugin {
private final String SPIGOT_RESOURCE_ID = "111135";
private final int BSTATS_METRICS_ID = 23679;
private final boolean DEBUG;
private boolean IS_DEV_VERSION;

private Config config;
private Messages messages;
Expand All @@ -33,6 +34,8 @@ public LavaRiseInstance() {
public void onEnable() {
new Logger(this, this.DEBUG);

this.IS_DEV_VERSION = this.getDescription().getVersion().contains("-dev");

this.config = new Config(this);
this.messages = new Messages(this);
this.arenaManager = new ArenaManager(this);
Expand All @@ -43,7 +46,7 @@ public void onEnable() {
this.getCommand("lavarise").setExecutor(new LavaRiseCommand(this));
this.getCommand("lavarise").setTabCompleter(new LavaRiseCommand(this));

if (this.config.Metrics() && !this.DEBUG) {
if (this.config.Metrics() && !this.DEBUG && !this.IS_DEV_VERSION) {
Logger.debug("Enabling bStats metrics");
new Metrics(this, BSTATS_METRICS_ID);
} else Logger.debug("bStats metrics are disabled, skipping");
Expand Down

0 comments on commit 3eec2e0

Please sign in to comment.