Interface PermissionSubject

All Known Subinterfaces:
CommandSource, ConsoleCommandSource, Player

public interface PermissionSubject
Represents an object that has a set of queryable permissions.
  • Method Details

    • hasPermission

      default boolean hasPermission(String permission)
      Determines whether the subject has a particular permission.
      Parameters:
      permission - the permission to check for
      Returns:
      whether the subject has the permission
    • getPermissionValue

      @NonNull Tristate getPermissionValue(String permission)
      Gets the subjects setting for a particular permission. Used as a delegate for PermissionFunction.getPermissionValue(String)
      Parameters:
      permission - the permission
      Returns:
      the value the permission is set to
    • getPermissionMap

      @Nullable @Unmodifiable Map<String,Boolean> getPermissionMap()
      Gets the subjects permission map. Should return null when the permission map is unavailable. Used as a delegate for PermissionResolver.getPermissionMap()
      Returns:
      the permission map or null if unavailable
    • getPermissionChecker

      default PermissionChecker getPermissionChecker()
      Gets the permission checker for the subject.
      Returns:
      subject's permission checker