mirror of
https://github.com/LuckPerms/LuckPerms.git
synced 2024-11-27 21:29:47 +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
|
@Override
|
||||||
public @NonNull DataMutateResult setPrimaryGroup(@NonNull String group) {
|
public @NonNull DataMutateResult setPrimaryGroup(@NonNull String group) {
|
||||||
Objects.requireNonNull(group, "group");
|
Objects.requireNonNull(group, "group");
|
||||||
if (getPrimaryGroup().equalsIgnoreCase(group)) {
|
if (group.equalsIgnoreCase(this.handle.getPrimaryGroup().getStoredValue().orElse(null))) {
|
||||||
return DataMutateResult.FAIL_ALREADY_HAS;
|
return DataMutateResult.FAIL_ALREADY_HAS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user