diff --git a/varo/src/main/java/de/cliffbreak/varo/Varo.java b/varo/src/main/java/de/cliffbreak/varo/Varo.java index cb80ed0..61bbea5 100644 --- a/varo/src/main/java/de/cliffbreak/varo/Varo.java +++ b/varo/src/main/java/de/cliffbreak/varo/Varo.java @@ -63,18 +63,6 @@ public class Varo extends JavaPlugin { this.configurationFile = new File("plugins/CliffbreakVaro", "config.yml"); this.config = YamlConfiguration.loadConfiguration(this.configurationFile); - this.npcManager = new NPCManager(this); - this.playerCache = new PlayerCache(this); - this.banUtils = new BanUtils(this); - this.varoUtils = new VaroUtils(this); - this.teamManager = new TeamManager(); - this.messageUtils = new MessageUtils(this); - this.database = new Database(); - this.gameTimeManager = new GameTimeManager(this); - this.playerUtils = new PlayerUtils(this); - this.borderManager = new BorderManager(this); - this.langUtils = new LangUtils(); - this.config.addDefault("Varo.Start", 1590393600000f); this.config.addDefault("Varo.Debug", false); this.config.addDefault("Varo.Discord.Token", "insert.token.here"); @@ -89,6 +77,18 @@ public class Varo extends JavaPlugin { this.config.options().copyDefaults(true); this.saveConfig(); + this.database = new Database(); + this.teamManager = new TeamManager(); + this.playerCache = new PlayerCache(this); + this.npcManager = new NPCManager(this); + this.banUtils = new BanUtils(this); + this.varoUtils = new VaroUtils(this); + this.messageUtils = new MessageUtils(this); + this.gameTimeManager = new GameTimeManager(this); + this.playerUtils = new PlayerUtils(this); + this.borderManager = new BorderManager(this); + this.langUtils = new LangUtils(); + this.getServer().getPluginManager().registerEvents(new PlayerLoginListener(this), this); this.getServer().getPluginManager().registerEvents(new PlayerJoinQuitListener(this), this); this.getServer().getPluginManager().registerEvents(new PlayerClientOptionsChangeListener(this), this);