Fixed too early call to super.onDisable

This commit is contained in:
Rsl1122 2017-11-05 12:21:49 +02:00
parent c9bcf0ee6f
commit e1c648fb9d
4 changed files with 7 additions and 6 deletions

View File

@ -318,8 +318,8 @@ public class Plan extends BukkitPlugin implements IPlan {
}).runTaskLaterAsynchronously(TimeAmount.SECOND.ticks() * 5L); }).runTaskLaterAsynchronously(TimeAmount.SECOND.ticks() * 5L);
} }
} }
super.onDisable();
Log.info(Locale.get(Msg.DISABLED).toString()); Log.info(Locale.get(Msg.DISABLED).toString());
super.onDisable();
} }
@Override @Override

View File

@ -162,6 +162,7 @@ public class PlanBungee extends BungeePlugin implements IPlan {
} }
} }
Log.info(Locale.get(Msg.DISABLED).toString()); Log.info(Locale.get(Msg.DISABLED).toString());
super.onDisable();
} }
@Override @Override

View File

@ -150,7 +150,7 @@ public class Analysis {
} }
private Map<String, Serializable> analyzeAdditionalPluginData(Set<UUID> uuids) { private Map<String, Serializable> analyzeAdditionalPluginData(Set<UUID> uuids) {
Benchmark.start("3rd party"); Benchmark.start("Analysis", "3rd party Analysis");
final Map<String, Serializable> replaceMap = new HashMap<>(); final Map<String, Serializable> replaceMap = new HashMap<>();
final HookHandler hookHandler = plugin.getHookHandler(); final HookHandler hookHandler = plugin.getHookHandler();
final List<PluginData> sources = hookHandler.getAdditionalDataSources().stream() final List<PluginData> sources = hookHandler.getAdditionalDataSources().stream()
@ -168,7 +168,7 @@ public class Analysis {
Log.logDebug("Analysis", "Additional Sources: " + sources.size()); Log.logDebug("Analysis", "Additional Sources: " + sources.size());
sources.parallelStream().filter(Verify::notNull).forEach(source -> { sources.parallelStream().filter(Verify::notNull).forEach(source -> {
try { try {
Benchmark.start("Source " + StringUtils.remove(source.getPlaceholder(), '%')); Benchmark.start("Analysis", "Source " + source.getPlaceholder());
final List<AnalysisType> analysisTypes = source.getAnalysisTypes(); final List<AnalysisType> analysisTypes = source.getAnalysisTypes();
if (analysisTypes.isEmpty()) { if (analysisTypes.isEmpty()) {
return; return;
@ -205,7 +205,7 @@ public class Analysis {
Log.toLog(this.getClass().getName(), e); Log.toLog(this.getClass().getName(), e);
} finally { } finally {
Benchmark.stop("Analysis", "Source " + StringUtils.remove(source.getPlaceholder(), '%')); Benchmark.stop("Analysis", "Source " + source.getPlaceholder());
} }
}); });
Benchmark.stop("Analysis", "3rd party"); Benchmark.stop("Analysis", "3rd party");
@ -238,7 +238,7 @@ public class Analysis {
long now = MiscUtils.getTime(); long now = MiscUtils.getTime();
Benchmark.start("Fetch Phase"); Benchmark.start("Analysis", "Fetch Phase");
try { try {
Map<String, Integer> commandUse = plugin.getDB().getCommandUse(); Map<String, Integer> commandUse = plugin.getDB().getCommandUse();
commandUsagePart.setCommandUsage(commandUse); commandUsagePart.setCommandUsage(commandUse);

View File

@ -19,7 +19,7 @@ public class BStats {
} }
public void registerMetrics() { public void registerMetrics() {
Log.debug("Enable", "Enabling bStats Metrics."); Log.logDebug("Enable", "Enabling bStats Metrics.");
if (metrics == null) { if (metrics == null) {
metrics = new Metrics(plugin); metrics = new Metrics(plugin);
} }