LuckPerms

LuckPerms

41.4k Downloads

[Question] List members of a group with API

xXSchrandXx opened this issue ยท 1 comments

commented

Hi,

I want to list the members of a specific group.
Just like in GroupListMembers...
How do I get to getStorage() or is there a way to list the groupmembers with a different way?
(Used in BungeeCord, so there are no OfflinePlayers I can use)

With great wishes

xXSchrandXx

commented

UserManager#getWithPermission is what you're after. :)

https://github.com/lucko/LuckPerms/blob/5eb8a262be3dca242fa78e5582f3aa6db16b90ad/api/src/main/java/net/luckperms/api/model/user/UserManager.java#L134-L141

Call that with group.groupname, e.g. group.admin as the permission.