mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2024-12-21 05:50:18 +08:00
Fixed too early call to super.onDisable
This commit is contained in:
parent
c9bcf0ee6f
commit
e1c648fb9d
@ -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
|
||||
|
@ -162,6 +162,7 @@ public class PlanBungee extends BungeePlugin implements IPlan {
|
||||
}
|
||||
}
|
||||
Log.info(Locale.get(Msg.DISABLED).toString());
|
||||
super.onDisable();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -150,7 +150,7 @@ public class Analysis {
|
||||
}
|
||||
|
||||
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 HookHandler hookHandler = plugin.getHookHandler();
|
||||
final List<PluginData> 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<AnalysisType> 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<String, Integer> commandUse = plugin.getDB().getCommandUse();
|
||||
commandUsagePart.setCommandUsage(commandUse);
|
||||
|
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user