geforkt von SteamWar/BungeeCore
Merge pull request 'Fix WhoisCommand' (#289) from active_punishments into master
Reviewed-on: SteamWar/BungeeCore#289 Reviewed-by: YoyoNow <jwsteam@nidido.de>
Dieser Commit ist enthalten in:
Commit
77a4bfb970
@ -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());
|
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 {
|
} else {
|
||||||
|
boolean isPunished = false;
|
||||||
for (Punishment.PunishmentType punishmentType : Punishment.PunishmentType.values()) {
|
for (Punishment.PunishmentType punishmentType : Punishment.PunishmentType.values()) {
|
||||||
if(user.isPunished(punishmentType)) {
|
if(!user.isPunished(punishmentType)) {
|
||||||
Message.send("WHOIS_NO_PUNISHMENT", player);
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
Punishment punishment = user.getPunishment(punishmentType);
|
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());
|
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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren