From e1c648fb9d56196d16d5cb94ab41bfdd3a69bc77 Mon Sep 17 00:00:00 2001 From: Rsl1122 Date: Sun, 5 Nov 2017 12:21:49 +0200 Subject: [PATCH] Fixed too early call to super.onDisable --- Plan/src/main/java/com/djrapitops/plan/Plan.java | 2 +- Plan/src/main/java/com/djrapitops/plan/PlanBungee.java | 1 + .../com/djrapitops/plan/utilities/analysis/Analysis.java | 8 ++++---- .../com/djrapitops/plan/utilities/metrics/BStats.java | 2 +- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/Plan/src/main/java/com/djrapitops/plan/Plan.java b/Plan/src/main/java/com/djrapitops/plan/Plan.java index 268da0a9c..1fdd8e1c1 100644 --- a/Plan/src/main/java/com/djrapitops/plan/Plan.java +++ b/Plan/src/main/java/com/djrapitops/plan/Plan.java @@ -318,8 +318,8 @@ public class Plan extends BukkitPlugin implements IPlan { }).runTaskLaterAsynchronously(TimeAmount.SECOND.ticks() * 5L); } } - super.onDisable(); Log.info(Locale.get(Msg.DISABLED).toString()); + super.onDisable(); } @Override diff --git a/Plan/src/main/java/com/djrapitops/plan/PlanBungee.java b/Plan/src/main/java/com/djrapitops/plan/PlanBungee.java index 42d0e8612..830de248c 100644 --- a/Plan/src/main/java/com/djrapitops/plan/PlanBungee.java +++ b/Plan/src/main/java/com/djrapitops/plan/PlanBungee.java @@ -162,6 +162,7 @@ public class PlanBungee extends BungeePlugin implements IPlan { } } Log.info(Locale.get(Msg.DISABLED).toString()); + super.onDisable(); } @Override diff --git a/Plan/src/main/java/com/djrapitops/plan/utilities/analysis/Analysis.java b/Plan/src/main/java/com/djrapitops/plan/utilities/analysis/Analysis.java index c8a00b18a..70e608051 100644 --- a/Plan/src/main/java/com/djrapitops/plan/utilities/analysis/Analysis.java +++ b/Plan/src/main/java/com/djrapitops/plan/utilities/analysis/Analysis.java @@ -150,7 +150,7 @@ public class Analysis { } private Map analyzeAdditionalPluginData(Set uuids) { - Benchmark.start("3rd party"); + Benchmark.start("Analysis", "3rd party Analysis"); final Map replaceMap = new HashMap<>(); final HookHandler hookHandler = plugin.getHookHandler(); final List sources = hookHandler.getAdditionalDataSources().stream() @@ -168,7 +168,7 @@ public class Analysis { Log.logDebug("Analysis", "Additional Sources: " + sources.size()); sources.parallelStream().filter(Verify::notNull).forEach(source -> { try { - Benchmark.start("Source " + StringUtils.remove(source.getPlaceholder(), '%')); + Benchmark.start("Analysis", "Source " + source.getPlaceholder()); final List analysisTypes = source.getAnalysisTypes(); if (analysisTypes.isEmpty()) { return; @@ -205,7 +205,7 @@ public class Analysis { Log.toLog(this.getClass().getName(), e); } finally { - Benchmark.stop("Analysis", "Source " + StringUtils.remove(source.getPlaceholder(), '%')); + Benchmark.stop("Analysis", "Source " + source.getPlaceholder()); } }); Benchmark.stop("Analysis", "3rd party"); @@ -238,7 +238,7 @@ public class Analysis { long now = MiscUtils.getTime(); - Benchmark.start("Fetch Phase"); + Benchmark.start("Analysis", "Fetch Phase"); try { Map commandUse = plugin.getDB().getCommandUse(); commandUsagePart.setCommandUsage(commandUse); diff --git a/Plan/src/main/java/com/djrapitops/plan/utilities/metrics/BStats.java b/Plan/src/main/java/com/djrapitops/plan/utilities/metrics/BStats.java index 8df2b2058..8b3635eab 100644 --- a/Plan/src/main/java/com/djrapitops/plan/utilities/metrics/BStats.java +++ b/Plan/src/main/java/com/djrapitops/plan/utilities/metrics/BStats.java @@ -19,7 +19,7 @@ public class BStats { } public void registerMetrics() { - Log.debug("Enable", "Enabling bStats Metrics."); + Log.logDebug("Enable", "Enabling bStats Metrics."); if (metrics == null) { metrics = new Metrics(plugin); }