Search in sources :

Example 1 with PermissionAttachmentInfo

use of cn.nukkit.permission.PermissionAttachmentInfo in project LuckPerms by lucko.

the class LPPermissible method getEffectivePermissions.

@Override
public Map<String, PermissionAttachmentInfo> getEffectivePermissions() {
    Set<Map.Entry<String, Boolean>> permissions = this.user.getCachedData().getPermissionData(calculateContexts()).getImmutableBacking().entrySet();
    Map<String, PermissionAttachmentInfo> ret = new HashMap<>(permissions.size());
    for (Map.Entry<String, Boolean> entry : permissions) {
        ret.put(entry.getKey(), new PermissionAttachmentInfo(this.player, entry.getKey(), null, entry.getValue()));
    }
    return ret;
}
Also used : ConcurrentHashMap(java.util.concurrent.ConcurrentHashMap) HashMap(java.util.HashMap) PermissionAttachmentInfo(cn.nukkit.permission.PermissionAttachmentInfo) AtomicBoolean(java.util.concurrent.atomic.AtomicBoolean) ConcurrentHashMap(java.util.concurrent.ConcurrentHashMap) HashMap(java.util.HashMap) Map(java.util.Map)

Aggregations

PermissionAttachmentInfo (cn.nukkit.permission.PermissionAttachmentInfo)1 HashMap (java.util.HashMap)1 Map (java.util.Map)1 ConcurrentHashMap (java.util.concurrent.ConcurrentHashMap)1 AtomicBoolean (java.util.concurrent.atomic.AtomicBoolean)1