Interface ChannelPermissionResult


Represents the result of a channel permission check.
Since:
3.0.0
  • Method Details

    • permitted

      boolean permitted()
      Check whether the action checked was permitted.
      Returns:
      permitted
      Since:
      3.0.0
    • reason

      Component reason()
      Reason for permission being denied. When the action was permitted, this should be equal to Component.empty().
      Returns:
      deny reason
      Since:
      3.0.0
    • allowed

      static ChannelPermissionResult allowed()
      Returns a result denoting that the player is permitted for the action.
      Returns:
      that the action is allowed
      Since:
      3.0.0
    • denied

      static ChannelPermissionResult denied(Component reason)
      Returns a result denoting that the action is denied for the player.
      Parameters:
      reason - the reason the action was denied
      Returns:
      that the action is denied
      Since:
      3.0.0
    • denied

      static ChannelPermissionResult denied(Supplier<Component> reason)
      Returns a result denoting that the action is denied for the player.
      Parameters:
      reason - the reason the action was denied
      Returns:
      that the action is denied
      Since:
      3.0.0
    • channelPermissionResult

      static ChannelPermissionResult channelPermissionResult(boolean allowed, Supplier<Component> denyReason)
      Create a ChannelPermissionResult based on allowed, computing denyReason when needed.
      Parameters:
      allowed - whether the result is allowed
      denyReason - deny reason supplier
      Returns:
      permission result
      Since:
      3.0.0