Skip to content

Commit

Permalink
πŸ“Œ[main/App] Change the order of inialization
Browse files Browse the repository at this point in the history
  • Loading branch information
sleepymalc committed Aug 19, 2021
1 parent 9292ec7 commit a239748
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions src/main/java/com/linyuanlin/minecraft/App.java
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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();
Expand Down

0 comments on commit a239748

Please sign in to comment.