mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-08 03:22:19 +01:00
Fixed AIOOBE when entering a space into console and hitting enter.
By: EvilSeph <evilseph@unaligned.org>
This commit is contained in:
parent
fbb5ca1dc6
commit
865f44281e
1 changed files with 5 additions and 0 deletions
|
@ -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…
Reference in a new issue