Fix ArrayIndexOutOfBoundsException when an empty command is typed

This commit is contained in:
Matthew Steglinski
2018-05-26 11:53:33 -04:00
parent 15d9cf2f8b
commit f24446ccad

View File

@@ -67,6 +67,12 @@ public class CommandManager
String[] split = typedText.split(" ");
// Fixes ArrayIndexOutOfBounds when typing ":: "
if (split.length == 0)
{
return;
}
String command = split[0];
String[] args = Arrays.copyOfRange(split, 1, split.length);