diff --git a/bukkit/src/main/java/me/lucko/luckperms/bukkit/model/server/LPSubscriptionMap.java b/bukkit/src/main/java/me/lucko/luckperms/bukkit/model/server/LPSubscriptionMap.java index c280c11f..53794d7e 100644 --- a/bukkit/src/main/java/me/lucko/luckperms/bukkit/model/server/LPSubscriptionMap.java +++ b/bukkit/src/main/java/me/lucko/luckperms/bukkit/model/server/LPSubscriptionMap.java @@ -161,6 +161,9 @@ public final class LPSubscriptionMap extends HashMap backing) { this.permission = permission; this.backing = backing; + + // remove all players from the map + this.backing.keySet().removeIf(p -> p instanceof Player); } public LPSubscriptionValueMap(String permission) { @@ -197,6 +200,16 @@ public final class LPSubscriptionMap extends HashMap> { if (content != null) { this.backing.addAll(content); } + + // remove all players from the map + this.backing.removeIf(p -> p instanceof Player); } private LPSubscriptionValueSet(String permission) { @@ -223,6 +227,11 @@ public final class LPSubscriptionMap extends HashMap> { @Override public boolean add(Permissible permissible) { + // don't allow players to be put into this map + if (permissible instanceof Player) { + return true; + } + return this.backing.add(permissible); }