add queue-server checking

This commit is contained in:
ajgeiss0702
2020-05-11 08:17:49 -07:00
parent 741e4fe191
commit d532c3dad6
2 changed files with 8 additions and 0 deletions
+1
View File
@@ -183,6 +183,7 @@ public class Main extends Plugin implements Listener {
String servername = e.getPlayer().getServer().getInfo().getName(); String servername = e.getPlayer().getServer().getInfo().getName();
List<String> svs = config.getStringList("queue-servers"); List<String> svs = config.getStringList("queue-servers");
for(String s : svs) { for(String s : svs) {
if(!s.contains(":")) continue;
String[] parts = s.split("\\:"); String[] parts = s.split("\\:");
String from = parts[0]; String from = parts[0];
String to = parts[1]; String to = parts[1];
@@ -31,6 +31,13 @@ public class ManageCommand extends Command {
} }
msgs.reload(); msgs.reload();
pl.getConfig().reload(); pl.getConfig().reload();
List<String> 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;
}
}
sender.sendMessage(msgs.getBC("commands.reload")); sender.sendMessage(msgs.getBC("commands.reload"));
return; return;