From cc902399711348155adfaea8059c64ce12452220 Mon Sep 17 00:00:00 2001 From: yoyosource Date: Sun, 4 Apr 2021 17:31:26 +0200 Subject: [PATCH] Fix ScriptListener ArrayIndesOutOfBoundsException --- .../src/de/steamwar/bausystem/world/ScriptListener.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/BauSystem_Main/src/de/steamwar/bausystem/world/ScriptListener.java b/BauSystem_Main/src/de/steamwar/bausystem/world/ScriptListener.java index cf084e2..425ff41 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/world/ScriptListener.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/world/ScriptListener.java @@ -369,6 +369,10 @@ public class ScriptListener implements Listener { scriptExecutor.player.sendMessage(BauSystem.PREFIX + "§cDie ersten beiden Argumente sind Zahlen/Boolsche Werte oder Variablen."); return -1; } + if (args.length < 3) { + scriptExecutor.player.sendMessage(BauSystem.PREFIX + "§cDas dritte Argument muss ein JumpPoint sein."); + return -1; + } int jumpTruePoint = scriptExecutor.jumpPoints.getOrDefault(args[2], -1); int jumpFalsePoint = args.length > 3 ? scriptExecutor.jumpPoints.getOrDefault(args[3], -1) : -1;