Make spec warp mandatory.

This is necessary to ensure a robust /ma spec command. If no spectator
warp is set, the command will throw an NPE - it is much more safe and
sane to require the warp.
This commit is contained in:
garbagemule 2013-09-21 15:27:41 +02:00
parent 096c4d4367
commit 451e39e3b7

View File

@ -135,16 +135,10 @@ public class SetupCommand implements Command, Listener {
missing.add("p2");
}
// Arena and lobby warps
// Arena, lobby, and spectator warps
if (region.getArenaWarp() == null) missing.add("arena");
if (region.getLobbyWarp() == null) missing.add("lobby");
// Conditionally optional spectator warp
if (arena.getSettings().getBoolean("spectate-on-death", true)) {
if (region.getSpecWarp() == null) {
missing.add("spectator");
}
}
if (region.getSpecWarp() == null) missing.add("spectator");
// Spawnpoints
if (region.getSpawnpoints().isEmpty()) {