diff --git a/api/src/main/java/me/lucko/luckperms/api/PermissionHolder.java b/api/src/main/java/me/lucko/luckperms/api/PermissionHolder.java index 5572a1f4..a5181db5 100644 --- a/api/src/main/java/me/lucko/luckperms/api/PermissionHolder.java +++ b/api/src/main/java/me/lucko/luckperms/api/PermissionHolder.java @@ -84,6 +84,9 @@ public interface PermissionHolder { /** * Refreshes and applies any changes to the cached holder data. * + *

Calling this method is unnecessary in most cases. Cache updates are handled + * behind the scenes by the implementation.

+ * * @return the task future * @since 4.0 */ diff --git a/common/src/main/java/me/lucko/luckperms/common/api/delegates/model/ApiPermissionHolder.java b/common/src/main/java/me/lucko/luckperms/common/api/delegates/model/ApiPermissionHolder.java index ab7a8763..ead7cc13 100644 --- a/common/src/main/java/me/lucko/luckperms/common/api/delegates/model/ApiPermissionHolder.java +++ b/common/src/main/java/me/lucko/luckperms/common/api/delegates/model/ApiPermissionHolder.java @@ -99,7 +99,7 @@ public class ApiPermissionHolder implements me.lucko.luckperms.api.PermissionHol @Nonnull @Override public CompletableFuture refreshCachedData() { - return this.handle.getCachedData().reloadAll(); + return CompletableFuture.runAsync(() -> this.handle.getCachedData().invalidateCaches()); } @Nonnull