mirror of
https://github.com/LuckPerms/LuckPerms.git
synced 2024-12-28 03:57:36 +01: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());
|
||||
}
|
||||
|
||||
String primary = joinFuture(pm.getPlayerPrimaryGroup(uuid)).getName().toLowerCase();
|
||||
if (!primary.equals("default")) {
|
||||
user.setPermission(NodeFactory.make("group." + primary));
|
||||
user.getPrimaryGroup().setStoredValue(primary);
|
||||
Group primaryGroup = joinFuture(pm.getPlayerPrimaryGroup(uuid));
|
||||
if (primaryGroup != null && primaryGroup.getName() != null) {
|
||||
String primary = primaryGroup.getName().toLowerCase();
|
||||
if (!primary.equals("default")) {
|
||||
user.setPermission(NodeFactory.make("group." + primary));
|
||||
user.getPrimaryGroup().setStoredValue(primary);
|
||||
}
|
||||
}
|
||||
|
||||
plugin.getUserManager().cleanup(user);
|
||||
|
Loading…
Reference in New Issue
Block a user