Fixed AIOOBE when entering a space into console and hitting enter.
This commit is contained in:
parent
98b331ba86
commit
cc3f7710ef
@ -69,6 +69,11 @@ public final class SimpleCommandMap implements CommandMap {
|
|||||||
*/
|
*/
|
||||||
public boolean dispatch(CommandSender sender, String commandLine) {
|
public boolean dispatch(CommandSender sender, String commandLine) {
|
||||||
String[] args = commandLine.split(" ");
|
String[] args = commandLine.split(" ");
|
||||||
|
|
||||||
|
if (args.length == 0) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
String sentCommandLabel = args[0].toLowerCase();
|
String sentCommandLabel = args[0].toLowerCase();
|
||||||
|
|
||||||
args = Arrays_copyOfRange(args, 1, args.length);
|
args = Arrays_copyOfRange(args, 1, args.length);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user