From abf422478894c8e9becf590c3f23690d415fd60e Mon Sep 17 00:00:00 2001 From: yoyosource Date: Tue, 16 Aug 2022 18:25:16 +0200 Subject: [PATCH] Update WhoisCommand --- src/de/steamwar/bungeecore/commands/WhoisCommand.java | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/de/steamwar/bungeecore/commands/WhoisCommand.java b/src/de/steamwar/bungeecore/commands/WhoisCommand.java index 83caa0f6..9e25ad25 100644 --- a/src/de/steamwar/bungeecore/commands/WhoisCommand.java +++ b/src/de/steamwar/bungeecore/commands/WhoisCommand.java @@ -44,7 +44,7 @@ public class WhoisCommand extends SWCommand { } @Register(description = "WHOIS_USAGE") - public void genericCommand(ProxiedPlayer player, @Mapper("player") String target, @OptionalValue("") @StaticValue({"-all", "-a", ""}) String displayAll) { + public void genericCommand(ProxiedPlayer player, @Mapper("player") String target, @OptionalValue("") @StaticValue(value = {"", "-all", "-a"}, allowISE = true) boolean all) { SteamwarUser user = SteamwarUser.get(target); if (user == null) { try { @@ -64,11 +64,9 @@ public class WhoisCommand extends SWCommand { if (user == null) { Message.send("UNKNOWN_PLAYER", player); - return; + } else { + sendUserinfo(player, user, all); } - - boolean all = displayAll.contains("-"); - sendUserinfo(player, user, all); } @Mapper(value = "player", local = true)