mirror of
https://github.com/LuckPerms/LuckPerms.git
synced 2026-11-24 10:34:24 +00:00
Don't attempt to migrate empty permissions
This commit is contained in:
5 files changed
+120
No files matched your search
@@ -55,6 +55,10 @@ public class SpongeMigrationUtils {
|
||||
ContextSet context = Util.convertContexts(e.getKey());
|
||||
|
||||
for (Map.Entry<String, Boolean> perm : e.getValue().entrySet()) {
|
||||
if (perm.getKey().isEmpty()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
holder.setPermission(NodeFactory.newBuilder(perm.getKey()).withExtraContext(context).setValue(perm.getValue()).build());
|
||||
}
|
||||
}
|
||||
@@ -65,6 +69,10 @@ public class SpongeMigrationUtils {
|
||||
ContextSet context = Util.convertContexts(e.getKey());
|
||||
|
||||
for (Map.Entry<String, String> opt : e.getValue().entrySet()) {
|
||||
if (opt.getKey().isEmpty() || opt.getValue().isEmpty()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (opt.getKey().equalsIgnoreCase("prefix")) {
|
||||
holder.setPermission(NodeFactory.makePrefixNode(priority, opt.getValue()).withExtraContext(context).setValue(true).build());
|
||||
} else if (opt.getKey().equalsIgnoreCase("suffix")) {
|
||||
|
||||
Reference in new issue
Block a user