mirror of
https://github.com/LuckPerms/LuckPerms.git
synced 2024-11-28 05:35:26 +01:00
Fix parents being cleared on promote/demote
This commit is contained in:
parent
6c9041ce40
commit
e15d03ed4e
@ -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) {}
|
||||
|
@ -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) {}
|
||||
|
Loading…
Reference in New Issue
Block a user