From 49fa7d3e126ac27794937a86d2d0506a4f65b125 Mon Sep 17 00:00:00 2001 From: Frank van der Heijden Date: Thu, 19 Aug 2021 18:34:46 +0200 Subject: [PATCH] Initialise instance first thing --- .../net/frankheijden/serverutils/velocity/ServerUtils.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Velocity/src/main/java/net/frankheijden/serverutils/velocity/ServerUtils.java b/Velocity/src/main/java/net/frankheijden/serverutils/velocity/ServerUtils.java index d593d0f..50ab03a 100644 --- a/Velocity/src/main/java/net/frankheijden/serverutils/velocity/ServerUtils.java +++ b/Velocity/src/main/java/net/frankheijden/serverutils/velocity/ServerUtils.java @@ -57,6 +57,7 @@ public class ServerUtils { */ @Inject public ServerUtils(ProxyServer proxy, @DataDirectory Path dataDirectory) { + instance = this; try { this.pluginCommandManager = VelocityPluginCommandManager.load(dataDirectory.resolve(PLUGIN_COMMANDS_CACHE)); } catch (IOException ex) { @@ -78,8 +79,6 @@ public class ServerUtils { */ @Subscribe public void onEnable(ProxyInitializeEvent event) { - instance = this; - this.plugin = new VelocityPlugin(this); ServerUtilsApp.init(this, plugin);