Fix bug with searching for group permissions via the api

This commit is contained in:
Luck 2020-05-19 13:32:06 +01:00
parent 637cb0d836
commit 5d6389249a
No known key found for this signature in database
GPG Key ID: EFA9B3EC5FD90F8B

View File

@ -115,7 +115,7 @@ public class ApiGroupManager extends ApiAbstractManager<Group, net.luckperms.api
@Deprecated @Deprecated
public @NonNull CompletableFuture<List<HeldNode<String>>> getWithPermission(@NonNull String permission) { public @NonNull CompletableFuture<List<HeldNode<String>>> getWithPermission(@NonNull String permission) {
Objects.requireNonNull(permission, "permission"); Objects.requireNonNull(permission, "permission");
return (CompletableFuture) this.plugin.getStorage().getUsersWithPermission(StandardNodeMatchers.key(permission)); return (CompletableFuture) this.plugin.getStorage().getGroupsWithPermission(StandardNodeMatchers.key(permission));
} }
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")