mirror of
https://github.com/LuckPerms/LuckPerms.git
synced 2026-11-13 23:04:05 +00:00
Fix parents being cleared on promote/demote
This commit is contained in:
2 files changed
+6
-2
No files matched your search
+3
-1
@@ -162,7 +162,9 @@ public class UserDemote extends SubCommand<User> {
|
||||
return CommandResult.LOADING_ERROR;
|
||||
}
|
||||
|
||||
user.clearParents(server, world);
|
||||
try {
|
||||
user.unsetPermission(nodes.stream().findAny().get());
|
||||
} catch (ObjectLacksException ignored) {}
|
||||
try {
|
||||
user.setPermission(NodeFactory.newBuilder("group." + previousGroup.getName()).setServer(server).setWorld(world).build());
|
||||
} catch (ObjectAlreadyHasException ignored) {}
|
||||
|
||||
+3
-1
@@ -162,7 +162,9 @@ public class UserPromote extends SubCommand<User> {
|
||||
return CommandResult.LOADING_ERROR;
|
||||
}
|
||||
|
||||
user.clearParents(server, world);
|
||||
try {
|
||||
user.unsetPermission(nodes.stream().findAny().get());
|
||||
} catch (ObjectLacksException ignored) {}
|
||||
try {
|
||||
user.setPermission(NodeFactory.newBuilder("group." + nextGroup.getName()).setServer(server).setWorld(world).build());
|
||||
} catch (ObjectAlreadyHasException ignored) {}
|
||||
|
||||
Reference in new issue
Block a user