Merge pull request #3345 from sainttx/fix-array-index-empty-command

Fix ArrayIndexOutOfBoundsException when an empty command is typed
This commit is contained in:
Tomas Slusny
2018-05-26 23:04:30 +02:00
committed by GitHub

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);