diff --git a/common/src/main/java/me/lucko/luckperms/common/commands/user/subcommands/UserDemote.java b/common/src/main/java/me/lucko/luckperms/common/commands/user/subcommands/UserDemote.java index a76f28e63..27a964d89 100644 --- a/common/src/main/java/me/lucko/luckperms/common/commands/user/subcommands/UserDemote.java +++ b/common/src/main/java/me/lucko/luckperms/common/commands/user/subcommands/UserDemote.java @@ -162,7 +162,9 @@ public class UserDemote extends SubCommand { 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) {} diff --git a/common/src/main/java/me/lucko/luckperms/common/commands/user/subcommands/UserPromote.java b/common/src/main/java/me/lucko/luckperms/common/commands/user/subcommands/UserPromote.java index c0c26f030..40c345052 100644 --- a/common/src/main/java/me/lucko/luckperms/common/commands/user/subcommands/UserPromote.java +++ b/common/src/main/java/me/lucko/luckperms/common/commands/user/subcommands/UserPromote.java @@ -162,7 +162,9 @@ public class UserPromote extends SubCommand { 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) {}