forked from kaboomserver/extras
Fix OOB exception in ServerCommand when the command is just a space (#355)
This commit is contained in:
parent
923a64c906
commit
6fc8d1117c
1 changed files with 5 additions and 0 deletions
|
@ -62,6 +62,11 @@ public final class ServerCommand implements Listener {
|
||||||
}
|
}
|
||||||
|
|
||||||
final String[] arr = command.split(" ");
|
final String[] arr = command.split(" ");
|
||||||
|
|
||||||
|
if (arr.length == 0) {
|
||||||
|
return command;
|
||||||
|
}
|
||||||
|
|
||||||
String commandName = arr[0].toLowerCase();
|
String commandName = arr[0].toLowerCase();
|
||||||
|
|
||||||
if (isConsoleCommand) {
|
if (isConsoleCommand) {
|
||||||
|
|
Loading…
Reference in a new issue