Fix metrics initialising before update checker (#4037)

This PR fixes an issue introduced in #3855, where bStats inits before the update checker and so fails to grab the current release branch.
This commit is contained in:
MD 2021-03-06 16:58:35 +00:00 committed by GitHub
parent 10fa3b5a31
commit 3cd69dabe9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -390,8 +390,6 @@ public class Essentials extends JavaPlugin implements net.ess3.api.IEssentials {
PermissionsDefaults.registerAllBackDefaults();
PermissionsDefaults.registerAllHatDefaults();
metrics = new MetricsWrapper(this, 858, true);
updateChecker = new UpdateChecker(this);
runTaskAsynchronously(() -> {
LOGGER.log(Level.INFO, tl("versionFetching"));
@ -400,6 +398,8 @@ public class Essentials extends JavaPlugin implements net.ess3.api.IEssentials {
}
});
metrics = new MetricsWrapper(this, 858, true);
execTimer.mark("Init(External)");
final String timeroutput = execTimer.end();