diff --git a/sponge/src/main/java/me/lucko/luckperms/sponge/service/persisted/SubjectDataHolder.java b/sponge/src/main/java/me/lucko/luckperms/sponge/service/persisted/SubjectDataHolder.java index aa9b4bc7..ce72e9aa 100644 --- a/sponge/src/main/java/me/lucko/luckperms/sponge/service/persisted/SubjectDataHolder.java +++ b/sponge/src/main/java/me/lucko/luckperms/sponge/service/persisted/SubjectDataHolder.java @@ -47,17 +47,23 @@ public class SubjectDataHolder { public SubjectDataHolder(Map> options, Map> permissions, Map> parents) { this.options = new HashMap<>(); for (Map.Entry> e : options.entrySet()) { - this.options.put(e.getKey().toMap(), new HashMap<>(e.getValue())); + if (!e.getValue().isEmpty()) { + this.options.put(e.getKey().toMap(), new HashMap<>(e.getValue())); + } } this.permissions = new HashMap<>(); for (Map.Entry> e : permissions.entrySet()) { - this.permissions.put(e.getKey().toMap(), new HashMap<>(e.getValue())); + if (!e.getValue().isEmpty()) { + this.permissions.put(e.getKey().toMap(), new HashMap<>(e.getValue())); + } } this.parents = new HashMap<>(); for (Map.Entry> e : parents.entrySet()) { - this.parents.put(e.getKey().toMap(), e.getValue().stream().map(SubjectReference::serialize).collect(Collectors.toList())); + if (!e.getValue().isEmpty()) { + this.parents.put(e.getKey().toMap(), e.getValue().stream().map(SubjectReference::serialize).collect(Collectors.toList())); + } } }