mirror of
https://github.com/LuckPerms/LuckPerms.git
synced 2024-12-28 03:57:36 +01:00
Conserve expiry time when promoting/demoting (#2794)
This commit is contained in:
parent
68167490d4
commit
8124a17adb
@ -316,7 +316,7 @@ public final class Track {
|
||||
}
|
||||
|
||||
user.unsetNode(DataType.NORMAL, oldNode);
|
||||
user.setNode(DataType.NORMAL, Inheritance.builder(nextGroup.getName()).withContext(context).build(), true);
|
||||
user.setNode(DataType.NORMAL, oldNode.toBuilder().group(nextGroup.getName()).build(), true);
|
||||
|
||||
if (context.isEmpty() && user.getPrimaryGroup().getStoredValue().orElse(GroupManager.DEFAULT_GROUP_NAME).equalsIgnoreCase(old)) {
|
||||
user.getPrimaryGroup().setStoredValue(nextGroup.getName());
|
||||
@ -370,7 +370,7 @@ public final class Track {
|
||||
}
|
||||
|
||||
user.unsetNode(DataType.NORMAL, oldNode);
|
||||
user.setNode(DataType.NORMAL, Inheritance.builder(previousGroup.getName()).withContext(context).build(), true);
|
||||
user.setNode(DataType.NORMAL, oldNode.toBuilder().group(previousGroup.getName()).build(), true);
|
||||
|
||||
if (context.isEmpty() && user.getPrimaryGroup().getStoredValue().orElse(GroupManager.DEFAULT_GROUP_NAME).equalsIgnoreCase(old)) {
|
||||
user.getPrimaryGroup().setStoredValue(previousGroup.getName());
|
||||
|
Loading…
Reference in New Issue
Block a user