From 451e39e3b7dc3c95bce010ff5d006ef80dea982d Mon Sep 17 00:00:00 2001 From: garbagemule Date: Sat, 21 Sep 2013 15:27:41 +0200 Subject: [PATCH] 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. --- .../MobArena/commands/setup/SetupCommand.java | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/com/garbagemule/MobArena/commands/setup/SetupCommand.java b/src/com/garbagemule/MobArena/commands/setup/SetupCommand.java index 0ab3e7e..5f55ace 100644 --- a/src/com/garbagemule/MobArena/commands/setup/SetupCommand.java +++ b/src/com/garbagemule/MobArena/commands/setup/SetupCommand.java @@ -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()) {