mirror of
https://github.com/LuckPerms/LuckPerms.git
synced 2024-12-28 03:57:36 +01:00
API User#setPrimaryGroup should care about stored value only (#3008)
This commit is contained in:
parent
71896a75bf
commit
528d668bc6
@ -79,7 +79,7 @@ public class ApiUser extends ApiPermissionHolder implements net.luckperms.api.mo
|
||||
@Override
|
||||
public @NonNull DataMutateResult setPrimaryGroup(@NonNull String group) {
|
||||
Objects.requireNonNull(group, "group");
|
||||
if (getPrimaryGroup().equalsIgnoreCase(group)) {
|
||||
if (group.equalsIgnoreCase(this.handle.getPrimaryGroup().getStoredValue().orElse(null))) {
|
||||
return DataMutateResult.FAIL_ALREADY_HAS;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user