Fix sponge @Default command handling

This commit is contained in:
Aikar
2017-07-03 00:04:45 -05:00
parent b128908a77
commit 6243202fe9
@@ -63,7 +63,8 @@ public class SpongeRootCommand implements CommandCallable, RootCommand {
@Override
public CommandResult process(CommandSource source, String arguments) throws CommandException {
if(this.execute(new SpongeCommandIssuer(manager, source), this.name, arguments.split(" "))) {
String[] args = arguments.isEmpty() ? new String[0] : arguments.split(" ");
if(this.execute(new SpongeCommandIssuer(manager, source), this.name, args)) {
return CommandResult.success();
}
return CommandResult.empty();
@@ -71,7 +72,8 @@ public class SpongeRootCommand implements CommandCallable, RootCommand {
@Override
public List<String> getSuggestions(CommandSource source, String arguments, @Nullable Location<World> location) throws CommandException {
return tabComplete(new SpongeCommandIssuer(manager, source), this.name, arguments.split(" "));
String[] args = arguments.isEmpty() ? new String[0] : arguments.split(" ");
return tabComplete(new SpongeCommandIssuer(manager, source), this.name, args);
}
@Override