SteamWar/BungeeCore
Archiviert
13
2
Dieser Commit ist enthalten in:
Chaoscaot 2021-01-16 16:41:34 +01:00
Ursprung 0d643d618a
Commit f99b10ade2
2 geänderte Dateien mit 6 neuen und 5 gelöschten Zeilen

Datei anzeigen

@ -19,7 +19,6 @@
package de.steamwar.bungeecore.listeners; package de.steamwar.bungeecore.listeners;
import de.steamwar.bungeecore.BungeeCore;
import de.steamwar.bungeecore.Message; import de.steamwar.bungeecore.Message;
import de.steamwar.bungeecore.sql.BannedUserIPs; import de.steamwar.bungeecore.sql.BannedUserIPs;
import de.steamwar.bungeecore.sql.SteamwarUser; import de.steamwar.bungeecore.sql.SteamwarUser;

Datei anzeigen

@ -43,10 +43,12 @@ public class Punishment {
} }
public static Map<PunishmentType, Punishment> getPunishmentsOfPlayer(int user) { public static Map<PunishmentType, Punishment> getPunishmentsOfPlayer(int user) {
Map<PunishmentType, Punishment> punishmentMap = new HashMap<>(); Map<PunishmentType, Punishment> punishments = new HashMap<>();
punishmentMap.put(PunishmentType.Ban, getPunishmentOfPlayer(user, PunishmentType.Ban)); Punishment banPunishment = getPunishmentOfPlayer(user, PunishmentType.Ban);
punishmentMap.put(PunishmentType.Mute, getPunishmentOfPlayer(user, PunishmentType.Mute)); if(banPunishment != null) punishments.put(PunishmentType.Ban, banPunishment);
return punishmentMap; Punishment mutePunishment = getPunishmentOfPlayer(user, PunishmentType.Mute);
if(mutePunishment != null) punishments.put(PunishmentType.Mute, mutePunishment);
return punishments;
} }
public static List<Punishment> getAllPunishmentsOfPlayer(int user) { public static List<Punishment> getAllPunishmentsOfPlayer(int user) {