will check the config when plugin enables too
This commit is contained in:
@@ -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<String> 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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user