From 7dd2179612577ac1f283b4f71cbc753b99245be2 Mon Sep 17 00:00:00 2001 From: Chaoscaot Date: Fri, 31 Dec 2021 13:23:48 +0100 Subject: [PATCH] Fix WhoisCommand Signed-off-by: Chaoscaot --- src/de/steamwar/bungeecore/commands/WhoisCommand.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/de/steamwar/bungeecore/commands/WhoisCommand.java b/src/de/steamwar/bungeecore/commands/WhoisCommand.java index ebe3884..bbb1af5 100644 --- a/src/de/steamwar/bungeecore/commands/WhoisCommand.java +++ b/src/de/steamwar/bungeecore/commands/WhoisCommand.java @@ -104,14 +104,18 @@ public class WhoisCommand extends BasicCommand { Message.sendPrefixless("WHOIS_PUNISHMENT", player, SteamwarUser.get(punishment.getPunisher()).getUserName(), punishment.getType().name(), punishment.getBantime(punishment.getStartTime(), false), punishment.getBantime(punishment.getEndTime(), punishment.isPerma()), punishment.getReason()); } } else { + boolean isPunished = false; for (Punishment.PunishmentType punishmentType : Punishment.PunishmentType.values()) { - if(user.isPunished(punishmentType)) { - Message.send("WHOIS_NO_PUNISHMENT", player); + if(!user.isPunished(punishmentType)) { continue; } Punishment punishment = user.getPunishment(punishmentType); + isPunished = true; Message.sendPrefixless("WHOIS_PUNISHMENT", player, SteamwarUser.get(punishment.getPunisher()).getUserName(), punishment.getType().name(), punishment.getBantime(punishment.getStartTime(), false), punishment.getBantime(punishment.getEndTime(), punishment.isPerma()), punishment.getReason()); } + if(!isPunished) { + Message.send("WHOIS_NO_PUNISHMENT", player); + } } } }