SteamWar/BungeeCore
Archiviert
13
2

Add some new punishments after talking with mods #352

Zusammengeführt
Lixfel hat 8 Commits von Punishment++ nach master 2022-05-01 22:20:01 +02:00 zusammengeführt
Nur Änderungen aus Commit cc86aa16a0 werden angezeigt - Alle Commits anzeigen

Datei anzeigen

@ -97,10 +97,6 @@ public class WhoisCommand extends BasicCommand {
Message.send("WHOIS_PUNISHMENTS", player);
List<Punishment> punishmentList = Punishment.getAllPunishmentsOfPlayer(user.getId());
if (punishmentList.isEmpty()) {
Message.send(all ? "WHOIS_NO_ALL_PUNISHMENT" : "WHOIS_NO_PUNISHMENT", player);
return;
}
Set<Punishment.PunishmentType> found = new HashSet<>();
YoyoNow markierte diese Unterhaltung als gelöst
Review

WÜrde hier die Prüfung weglassen und nur die nach der for-Schleife nutzen

WÜrde hier die Prüfung weglassen und nur die nach der for-Schleife nutzen
boolean isPunished = false;
for (Punishment punishment : punishmentList) {
@ -110,8 +106,8 @@ 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());
isPunished = true;
}
if (!all && !isPunished) {
Message.send("WHOIS_NO_PUNISHMENT", player);
if (!isPunished) {
Message.send(all ? "WHOIS_NO_ALL_PUNISHMENT" : "WHOIS_NO_PUNISHMENT", player);
}
}
}