mirror of
https://github.com/aikar/commands.git
synced 2026-06-01 14:52:18 +00:00
remove extra error feedback on OnlinePlayer's
This commit is contained in:
@@ -141,14 +141,12 @@ public class SpongeCommandContexts extends CommandContexts<SpongeCommandExecutio
|
||||
|
||||
@Nullable
|
||||
OnlinePlayer getOnlinePlayer(SpongeCommandIssuer issuer, String lookup, boolean allowMissing) throws InvalidCommandArgument {
|
||||
CommandSource sender = issuer.getIssuer();
|
||||
Player player = ACFSpongeUtil.findPlayerSmart(issuer, lookup);
|
||||
//noinspection Duplicates
|
||||
if (player == null) {
|
||||
if (allowMissing) {
|
||||
return null;
|
||||
}
|
||||
this.manager.sendMessage(sender, MessageType.ERROR, MessageKeys.COULD_NOT_FIND_PLAYER, "{search}", lookup);
|
||||
throw new InvalidCommandArgument(false);
|
||||
}
|
||||
return new OnlinePlayer(player);
|
||||
|
||||
Reference in New Issue
Block a user