mirror of
https://github.com/aikar/commands.git
synced 2026-06-02 15:22:17 +00:00
remove extra error feedback on OnlinePlayer's
This commit is contained in:
@@ -38,14 +38,11 @@ public class BungeeCommandContexts extends CommandContexts<BungeeCommandExecutio
|
||||
BungeeCommandContexts(CommandManager manager) {
|
||||
super(manager);
|
||||
registerContext(OnlineProxiedPlayer.class, (c) -> {
|
||||
final String playercheck = c.popFirstArg();
|
||||
ProxiedPlayer proxiedPlayer = ACFBungeeUtil.findPlayerSmart(c.getIssuer(), playercheck);
|
||||
ProxiedPlayer proxiedPlayer = ACFBungeeUtil.findPlayerSmart(c.getIssuer(), c.popFirstArg());
|
||||
if (proxiedPlayer == null) {
|
||||
if (c.hasAnnotation(Optional.class)) {
|
||||
return null;
|
||||
}
|
||||
c.getIssuer().sendMessage(MessageType.ERROR, MessageKeys.COULD_NOT_FIND_PLAYER,
|
||||
"{search}", playercheck);
|
||||
throw new InvalidCommandArgument(false);
|
||||
}
|
||||
return new OnlineProxiedPlayer(proxiedPlayer);
|
||||
|
||||
Reference in New Issue
Block a user