Interface PermissionHolder

All Known Subinterfaces:
AnnotatedParameter<S>, Command<S>, CommandParameter<S>, CommandUsage<S>, FlagParameter<S>, NumericParameter<S>
All Known Implementing Classes:
AnnotationParameterDecorator, FlagCommandParameter, InputParameter, NumericParameterDecorator

public interface PermissionHolder
Represents an entity that can hold a permission. This interface allows getting and setting a permission string.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addPermission(String permission)
    Adds a permission for this holder.
    @Unmodifiable Set<String>
    Retrieves the permission associated with this holder.
    default boolean
    hasPermission(String permission)
     
  • Method Details

    • getPermissions

      @Unmodifiable Set<String> getPermissions()
      Retrieves the permission associated with this holder.
      Returns:
      A set of permission strings, if no permissions are set, it will return an empty set.
    • addPermission

      void addPermission(String permission)
      Adds a permission for this holder.
      Parameters:
      permission - the permission string to add, can be null.
    • hasPermission

      default boolean hasPermission(String permission)