Initialise instance first thing

This commit is contained in:
Frank van der Heijden 2021-08-19 18:34:46 +02:00
parent eabac89b69
commit 49fa7d3e12
No known key found for this signature in database
GPG key ID: B808721C2DD5B5B8

View file

@ -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);