Search in sources :

Example 6 with PermissionUser

use of ru.tehkode.permissions.PermissionUser in project AuthMeReloaded by AuthMe.

the class PermissionsExHandler method removeFromGroup.

@Override
public boolean removeFromGroup(OfflinePlayer player, UserGroup group) {
    PermissionUser user = permissionManager.getUser(player.getName());
    user.removeGroup(group.getGroupName());
    return true;
}
Also used : PermissionUser(ru.tehkode.permissions.PermissionUser)

Example 7 with PermissionUser

use of ru.tehkode.permissions.PermissionUser in project AuthMeReloaded by AuthMe.

the class PermissionsExHandler method setGroup.

@Override
public boolean setGroup(OfflinePlayer player, UserGroup group) {
    List<String> groups = new ArrayList<>();
    groups.add(group.getGroupName());
    PermissionUser user = permissionManager.getUser(player.getName());
    user.setParentsIdentifier(groups);
    return true;
}
Also used : PermissionUser(ru.tehkode.permissions.PermissionUser) ArrayList(java.util.ArrayList)

Aggregations

PermissionUser (ru.tehkode.permissions.PermissionUser)7 ArrayList (java.util.ArrayList)2 List (java.util.List)1 Map (java.util.Map)1 User (me.lucko.luckperms.common.model.User)1 PermissionGroup (ru.tehkode.permissions.PermissionGroup)1