Fix NPE
Dieser Commit ist enthalten in:
Ursprung
0d643d618a
Commit
f99b10ade2
@ -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;
|
||||||
|
@ -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) {
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren