getDisplayName API
Closed this issue ยท 1 comments
I have code a little Plugin with LuckPerms API but i need help. How can i read the Displayname (perm on MySQL is: "displayname.Owner"
I can read whit this only GroupName and shows as owner but i configure it as Owner
LuckPermsApi api = LuckPerms.getApi();
User user = api.getUser(p.getUniqueId())
String GroupData = user.getPrimaryGroup();
How can i change that GroupName to Owner or read the DisplayName ?
Take the result of user.getPrimaryGroup
and pass that group name to api.getGroup
- that will give you a Group
object.
You can then use group.getFriendlyName
to get its display name.