From 865f44281e0152ef0b08bece3dab9f31cc683422 Mon Sep 17 00:00:00 2001 From: Bukkit/Spigot Date: Sun, 24 Apr 2011 21:49:45 -0400 Subject: [PATCH] Fixed AIOOBE when entering a space into console and hitting enter. By: EvilSeph --- .../src/main/java/org/bukkit/command/SimpleCommandMap.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/paper-api/src/main/java/org/bukkit/command/SimpleCommandMap.java b/paper-api/src/main/java/org/bukkit/command/SimpleCommandMap.java index 777996df05..d77656220e 100644 --- a/paper-api/src/main/java/org/bukkit/command/SimpleCommandMap.java +++ b/paper-api/src/main/java/org/bukkit/command/SimpleCommandMap.java @@ -69,6 +69,11 @@ public final class SimpleCommandMap implements CommandMap { */ public boolean dispatch(CommandSender sender, String commandLine) { String[] args = commandLine.split(" "); + + if (args.length == 0) { + return false; + } + String sentCommandLabel = args[0].toLowerCase(); args = Arrays_copyOfRange(args, 1, args.length);