Class PlayerUtil


  • public final class PlayerUtil
    extends Object
    The utility class for player
    • Method Detail

      • hasAnyPermission

        public static boolean hasAnyPermission​(org.bukkit.entity.Player player,
                                               Collection<org.bukkit.permissions.Permission> permissions)
        Check if the player has one of the permissions
        Parameters:
        player - the player
        permissions - the permissions
        Returns:
        true if the player does
      • hasPermission

        public static boolean hasPermission​(org.bukkit.entity.Player player,
                                            String permission)
        Check if the player has the permission
        Parameters:
        player - the player
        permission - the permission. If it starts with "-", it will check if the player doesn't have the permission
        Returns:
        true if the player does