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:
@@ -135,16 +135,10 @@ public class SetupCommand implements Command, Listener {
|
|||||||
missing.add("p2");
|
missing.add("p2");
|
||||||
}
|
}
|
||||||
|
|
||||||
// Arena and lobby warps
|
// Arena, lobby, and spectator warps
|
||||||
if (region.getArenaWarp() == null) missing.add("arena");
|
if (region.getArenaWarp() == null) missing.add("arena");
|
||||||
if (region.getLobbyWarp() == null) missing.add("lobby");
|
if (region.getLobbyWarp() == null) missing.add("lobby");
|
||||||
|
if (region.getSpecWarp() == null) missing.add("spectator");
|
||||||
// Conditionally optional spectator warp
|
|
||||||
if (arena.getSettings().getBoolean("spectate-on-death", true)) {
|
|
||||||
if (region.getSpecWarp() == null) {
|
|
||||||
missing.add("spectator");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Spawnpoints
|
// Spawnpoints
|
||||||
if (region.getSpawnpoints().isEmpty()) {
|
if (region.getSpawnpoints().isEmpty()) {
|
||||||
|
|||||||
Reference in New Issue
Block a user