diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/script/command/If.java b/BauSystem_Main/src/de/steamwar/bausystem/features/script/command/If.java index e2a2ac44..47d92f25 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/script/command/If.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/script/command/If.java @@ -46,7 +46,7 @@ public class If implements SpecialCommand { BauSystem.MESSAGE.send("SCRIPT_COMMAND_ERROR_NO_BOOLEAN", scriptExecutor.getPlayer()); return false; } - if (v.asBoolean()) { + if (v.asBoolean() && command.length > 2) { jumpToIndex(scriptExecutor, command[2]); } else if (command.length > 3) { jumpToIndex(scriptExecutor, command[3]);