Archiviert
1
0

fix nullpointer

Dieser Commit ist enthalten in:
zOnlyKroks 2023-01-03 21:38:30 +01:00
Ursprung 8b96e5d853
Commit 93d530830d

Datei anzeigen

@ -112,7 +112,7 @@ public class WhoisCommand extends SWCommand {
if (parameterTypes.contains(WhoisParameterTypes.MOD)) { if (parameterTypes.contains(WhoisParameterTypes.MOD)) {
List<Mod> activeMods = Utils.playerModMap.get(user.getUuid()); List<Mod> activeMods = Utils.playerModMap.get(user.getUuid());
if (!activeMods.isEmpty()) { if (activeMods != null && !activeMods.isEmpty()) {
Message.send("WHOIS_ACTIVE_MODS", player,activeMods.size()); Message.send("WHOIS_ACTIVE_MODS", player,activeMods.size());
String result = activeMods.stream().map(mod -> "§" + mod.getModType().getColorCode() + mod.getModName()).collect(Collectors.joining("§8, ")); String result = activeMods.stream().map(mod -> "§" + mod.getModType().getColorCode() + mod.getModName()).collect(Collectors.joining("§8, "));
Message.send("WHOIS_ACTIVE_MOD", player, result); Message.send("WHOIS_ACTIVE_MOD", player, result);