mirror of
https://github.com/aikar/commands.git
synced 2026-06-01 14:52:18 +00:00
Fix sponge @Default command handling
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user