Java Code Examples for org.bukkit.entity.Player#isPermissionSet()

The following examples show how to use org.bukkit.entity.Player#isPermissionSet() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: LuckPermsSubscriptionMap.java    From LuckPerms with MIT License 6 votes vote down vote up
@Override
public @NonNull Set<Permissible> keySet() {
    // start with the backing set
    Set<Permissible> set;
    synchronized (this.backing) {
        set = new HashSet<>(this.backing.keySet());
    }

    // add any online players who meet requirements
    for (Player player : LuckPermsSubscriptionMap.this.plugin.getBootstrap().getServer().getOnlinePlayers()) {
        if (player.hasPermission(this.permission) || player.isPermissionSet(this.permission)) {
            set.add(player);
        }
    }

    return set;
}
 
Example 2
Source File: ChannelPlayerUUID.java    From LunaChat with GNU Lesser General Public License v3.0 5 votes vote down vote up
/**
 * 指定されたパーミッションノードが定義されているかどうかを取得する
 * @param node パーミッションノード
 * @return 定義を持っているかどうか
 * @see com.github.ucchyocean.lc.channel.ChannelPlayer#isPermissionSet(java.lang.String)
 */
@Override
public boolean isPermissionSet(String node) {
    Player player = getPlayer();
    if ( player == null ) {
        return false;
    } else {
        return player.isPermissionSet(node);
    }
}
 
Example 3
Source File: ChannelPlayerName.java    From LunaChat with GNU Lesser General Public License v3.0 5 votes vote down vote up
/**
 * 指定されたパーミッションノードが定義されているかどうかを取得する
 * @param node パーミッションノード
 * @return 定義を持っているかどうか
 * @see com.github.ucchyocean.lc.channel.ChannelPlayer#isPermissionSet(java.lang.String)
 */
@Override
public boolean isPermissionSet(String node) {
    Player player = getPlayer();
    if ( player == null ) {
        return false;
    } else {
        return player.isPermissionSet(node);
    }
}
 
Example 4
Source File: ChannelMemberPlayer.java    From LunaChat with GNU Lesser General Public License v3.0 5 votes vote down vote up
/**
 * 指定されたパーミッションノードが定義されているかどうかを取得する
 * @param node パーミッションノード
 * @return 定義を持っているかどうか
 * @see com.github.ucchyocean.lc.channel.ChannelPlayer#isPermissionSet(java.lang.String)
 */
@Override
public boolean isPermissionSet(String node) {
    Player player = getPlayer();
    if ( player == null ) {
        return false;
    } else {
        return player.isPermissionSet(node);
    }
}