geforkt von SteamWar/BungeeCore
Fix NPE
Dieser Commit ist enthalten in:
Ursprung
0d643d618a
Commit
f99b10ade2
@ -19,7 +19,6 @@
|
||||
|
||||
package de.steamwar.bungeecore.listeners;
|
||||
|
||||
import de.steamwar.bungeecore.BungeeCore;
|
||||
import de.steamwar.bungeecore.Message;
|
||||
import de.steamwar.bungeecore.sql.BannedUserIPs;
|
||||
import de.steamwar.bungeecore.sql.SteamwarUser;
|
||||
|
@ -43,10 +43,12 @@ public class Punishment {
|
||||
}
|
||||
|
||||
public static Map<PunishmentType, Punishment> getPunishmentsOfPlayer(int user) {
|
||||
Map<PunishmentType, Punishment> punishmentMap = new HashMap<>();
|
||||
punishmentMap.put(PunishmentType.Ban, getPunishmentOfPlayer(user, PunishmentType.Ban));
|
||||
punishmentMap.put(PunishmentType.Mute, getPunishmentOfPlayer(user, PunishmentType.Mute));
|
||||
return punishmentMap;
|
||||
Map<PunishmentType, Punishment> punishments = new HashMap<>();
|
||||
Punishment banPunishment = getPunishmentOfPlayer(user, PunishmentType.Ban);
|
||||
if(banPunishment != null) punishments.put(PunishmentType.Ban, banPunishment);
|
||||
Punishment mutePunishment = getPunishmentOfPlayer(user, PunishmentType.Mute);
|
||||
if(mutePunishment != null) punishments.put(PunishmentType.Mute, mutePunishment);
|
||||
return punishments;
|
||||
}
|
||||
|
||||
public static List<Punishment> getAllPunishmentsOfPlayer(int user) {
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren