From 528d668bc6fee6e824d639585a713b51c427be3f Mon Sep 17 00:00:00 2001 From: Luck Date: Mon, 3 May 2021 23:10:57 +0100 Subject: [PATCH] API User#setPrimaryGroup should care about stored value only (#3008) --- .../me/lucko/luckperms/common/api/implementation/ApiUser.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/src/main/java/me/lucko/luckperms/common/api/implementation/ApiUser.java b/common/src/main/java/me/lucko/luckperms/common/api/implementation/ApiUser.java index 1b5635391..53ac4f15c 100644 --- a/common/src/main/java/me/lucko/luckperms/common/api/implementation/ApiUser.java +++ b/common/src/main/java/me/lucko/luckperms/common/api/implementation/ApiUser.java @@ -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; }