diff --git a/src/main/java/us/ajg0702/queue/Main.java b/src/main/java/us/ajg0702/queue/Main.java index 6c1efa5..68c6031 100644 --- a/src/main/java/us/ajg0702/queue/Main.java +++ b/src/main/java/us/ajg0702/queue/Main.java @@ -40,6 +40,7 @@ public class Main extends Plugin implements Listener { msgs = BungeeMessages.getInstance(this); config = new BungeeConfig(this); + checkConfig(); this.getProxy().getPluginManager().registerCommand(this, new MoveCommand(this)); this.getProxy().getPluginManager().registerCommand(this, new ManageCommand(this)); @@ -71,6 +72,16 @@ public class Main extends Plugin implements Listener { } + public void checkConfig() { + List svs = getConfig().getStringList("queue-servers"); + for(String s : svs) { + if(!s.contains(":")) { + getLogger().warning("The queue-servers section in the config has been set up incorrectly! Please read the comment above the setting and make sure you have a queue server and a destination server separated by a colon (:)"); + break; + } + } + } + public BungeeConfig getConfig() { return config; } diff --git a/src/main/java/us/ajg0702/queue/ManageCommand.java b/src/main/java/us/ajg0702/queue/ManageCommand.java index ce8beee..2f414f2 100644 --- a/src/main/java/us/ajg0702/queue/ManageCommand.java +++ b/src/main/java/us/ajg0702/queue/ManageCommand.java @@ -31,13 +31,7 @@ public class ManageCommand extends Command { } msgs.reload(); pl.getConfig().reload(); - List svs = pl.getConfig().getStringList("queue-servers"); - for(String s : svs) { - if(!s.contains(":")) { - pl.getLogger().warning("The queue-servers section in the config has been set up incorrectly! Please read the comment above the setting and make sure you have a queue server and a destination server separated by a colon (:)"); - break; - } - } + pl.checkConfig(); sender.sendMessage(msgs.getBC("commands.reload")); return;