mirror of
https://github.com/LuckPerms/LuckPerms.git
synced 2024-10-06 01:07:29 +02:00
Add extra catch for null primary group in powerfulperms migration
This commit is contained in:
parent
0e581cbcf3
commit
94a4051d29
@ -264,10 +264,13 @@ public class MigrationPowerfulPerms extends SubCommand<Object> {
|
|||||||
user.setPermission(NodeFactory.makeSuffixNode(maxWeight, suffix).build());
|
user.setPermission(NodeFactory.makeSuffixNode(maxWeight, suffix).build());
|
||||||
}
|
}
|
||||||
|
|
||||||
String primary = joinFuture(pm.getPlayerPrimaryGroup(uuid)).getName().toLowerCase();
|
Group primaryGroup = joinFuture(pm.getPlayerPrimaryGroup(uuid));
|
||||||
if (!primary.equals("default")) {
|
if (primaryGroup != null && primaryGroup.getName() != null) {
|
||||||
user.setPermission(NodeFactory.make("group." + primary));
|
String primary = primaryGroup.getName().toLowerCase();
|
||||||
user.getPrimaryGroup().setStoredValue(primary);
|
if (!primary.equals("default")) {
|
||||||
|
user.setPermission(NodeFactory.make("group." + primary));
|
||||||
|
user.getPrimaryGroup().setStoredValue(primary);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
plugin.getUserManager().cleanup(user);
|
plugin.getUserManager().cleanup(user);
|
||||||
|
Loading…
Reference in New Issue
Block a user