forked from GeyserMC/Geyser
Remove 'geyser' from parameters when executing a command under Spigot, Bungeecord, Sponge, Velocity (#1266)
* Remove 'geyser' from parameters when executing a command under Spigot, Bungeecode, Sponge, Velocity Fixes https://github.com/bundabrg/GeyserReversion/issues/8 * Fix case when there are no sub commands Co-authored-by: bundabrg <bundabrg@grieve.com.au>
This commit is contained in:
parent
3650321576
commit
650c02ef66
4 changed files with 10 additions and 8 deletions
|
@ -59,10 +59,10 @@ public class GeyserSpongeCommandExecutor implements CommandCallable {
|
|||
source.sendMessage(Text.of(ChatColor.RED + LanguageUtils.getLocaleStringLog("geyser.bootstrap.command.permission_fail")));
|
||||
return CommandResult.success();
|
||||
}
|
||||
getCommand(args[0]).execute(new SpongeCommandSender(source), args);
|
||||
getCommand(args[0]).execute(new SpongeCommandSender(source), args.length > 1 ? Arrays.copyOfRange(args, 1, args.length) : new String[0]);
|
||||
}
|
||||
} else {
|
||||
getCommand("help").execute(new SpongeCommandSender(source), args);
|
||||
getCommand("help").execute(new SpongeCommandSender(source), new String[0]);
|
||||
}
|
||||
return CommandResult.success();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue