diff --git a/common/src/main/java/me/lucko/luckperms/common/storage/backing/JSONBacking.java b/common/src/main/java/me/lucko/luckperms/common/storage/backing/JSONBacking.java index 67393cfdd..3f72ce951 100644 --- a/common/src/main/java/me/lucko/luckperms/common/storage/backing/JSONBacking.java +++ b/common/src/main/java/me/lucko/luckperms/common/storage/backing/JSONBacking.java @@ -548,7 +548,15 @@ public class JSONBacking extends FlatfileBacking { context = NodeModel.deserializeContextSet(contexts).makeImmutable(); } - nodes.add(NodeModel.of(permission, value, server, world, expiry, context)); + final JsonElement batchAttribute = attributes.get("permissions"); + if (permission.startsWith("luckperms.batch") && batchAttribute != null && batchAttribute.isJsonArray()) { + for (JsonElement element : batchAttribute.getAsJsonArray()) { + nodes.add(NodeModel.of(element.getAsString(), value, server, world, expiry, context)); + } + } else { + nodes.add(NodeModel.of(permission, value, server, world, expiry, context)); + } + } return nodes; diff --git a/common/src/main/java/me/lucko/luckperms/common/storage/backing/YAMLBacking.java b/common/src/main/java/me/lucko/luckperms/common/storage/backing/YAMLBacking.java index e83ebbc75..7377a3287 100644 --- a/common/src/main/java/me/lucko/luckperms/common/storage/backing/YAMLBacking.java +++ b/common/src/main/java/me/lucko/luckperms/common/storage/backing/YAMLBacking.java @@ -556,7 +556,15 @@ public class YAMLBacking extends FlatfileBacking { context = map.build(); } - nodes.add(NodeModel.of(permission, value, server, world, expiry, ImmutableContextSet.fromMultimap(context))); + if (permission.startsWith("luckperms.batch") && attributes.get("permissions") instanceof List) { + final List batchPerms = (List) attributes.get("permissions"); + for (String rawPerm : batchPerms) { + nodes.add(NodeModel.of(rawPerm, value, server, world, expiry, ImmutableContextSet.fromMultimap(context))); + } + } else { + nodes.add(NodeModel.of(permission, value, server, world, expiry, ImmutableContextSet.fromMultimap(context))); + } + } }