From a23974885a3f21a0e6bde43a2392cec2a15f76e4 Mon Sep 17 00:00:00 2001 From: sleepymalc Date: Thu, 19 Aug 2021 11:03:19 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=93=8C[main/App]=20Change=20the=20order?= =?UTF-8?q?=20of=20inialization?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/linyuanlin/minecraft/App.java | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/src/main/java/com/linyuanlin/minecraft/App.java b/src/main/java/com/linyuanlin/minecraft/App.java index 07938e0..13291fd 100644 --- a/src/main/java/com/linyuanlin/minecraft/App.java +++ b/src/main/java/com/linyuanlin/minecraft/App.java @@ -50,6 +50,13 @@ public void downloadAllUserData() throws Exception { @Override public void onEnable() { + // register managers + this.worldManager = new WorldManager(); + this.discordBotManager = new DiscordBotManager(); + this.teamManager = new TeamManager(); + this.tradeManager = new TradeManager(); + this.guildManager = new GuildManager(); + this.locationManager = new LocationManager(); this.getServer().getMessenger().registerOutgoingPluginChannel(this, "BungeeCord"); this.getServer().getMessenger().registerIncomingPluginChannel(this, "BungeeCord", this.PMH); @@ -72,14 +79,6 @@ public void onEnable() { getServer().getPluginManager().registerEvents(this, this); - // register managers - this.worldManager = new WorldManager(); - this.discordBotManager = new DiscordBotManager(); - this.teamManager = new TeamManager(); - this.tradeManager = new TradeManager(); - this.guildManager = new GuildManager(); - this.locationManager = new LocationManager(); - // handling configs this.saveDefaultConfig();