Interface PermissionProfile

All Known Implementing Classes:
ConsolePermissionProfile, NullPermissionProfile

public interface PermissionProfile
A permission profile that can be used to check for permissions
  • Method Summary

    Modifier and Type
    Method
    Description
    default boolean
    hasKeyedPermission​(@NonNull String permission, @NonNull String key)
    Check if the owner of the profile has a given (global) keyed permission.
    boolean
    hasKeyedPermission​(@Nullable String world, @NonNull String permission, @NonNull String key)
    Check if the owner of the profile has a given keyed permission.
    default boolean
    hasPermission​(@NonNull String permission)
    Check if the owner of the profile has a given (global) permission
    boolean
    hasPermission​(@Nullable String world, @NonNull String permission)
    Check if the owner of the profile has a given permission
  • Method Details

    • hasPermission

      default boolean hasPermission(@NonNull String permission)
      Check if the owner of the profile has a given (global) permission
      Parameters:
      permission - Permission
      Returns:
      true if the owner has the given permission, else false
    • hasPermission

      boolean hasPermission(@Nullable String world, @NonNull String permission)
      Check if the owner of the profile has a given permission
      Parameters:
      world - World name
      permission - Permission
      Returns:
      true if the owner has the given permission, else false
    • hasKeyedPermission

      default boolean hasKeyedPermission(@NonNull String permission, @NonNull String key)
      Check if the owner of the profile has a given (global) keyed permission. Checks both permission.key and permission.*
      Parameters:
      permission - Permission
      key - Permission "key"
      Returns:
      true if the owner has the given permission, else false
    • hasKeyedPermission

      boolean hasKeyedPermission(@Nullable String world, @NonNull String permission, @NonNull String key)
      Check if the owner of the profile has a given keyed permission. Checks both permission.key and permission.*
      Parameters:
      world - World name
      permission - Permission
      key - Permission "key"
      Returns:
      true if the owner has the given permission, else false