Interface GroupResponse

All Known Implementing Classes:
BentoBoxGroupResponse, BetterTeamsGroupResponse, FactionsBridgeGroupResponse, FactionsUUIDGroupResponse, HuskTownsGroupResponse, KingdomsGroupResponse, LandsGroupResponse, McMMOGroupResponse, PartiesGroupResponse, PlaceholderGroupResponse, SimpleClansGroupResponse, SuperiorSkyblockGroupResponse, TownyGroupResponse

public interface GroupResponse
The response when querying a group from GroupProvider. Contains the error getter, the handled boolean method, and the Group interface object.
  • Method Details

    • of

      static GroupResponse of(Group group)
      Create a handled GroupResponse with the given group.
      Parameters:
      group - the group
      Returns:
      the group response
    • handled

      static GroupResponse handled(Group group)
      Create a handled GroupResponse with the given group.
      Parameters:
      group - the group
      Returns:
      the group response
    • notHandled

      static GroupResponse notHandled()
      Create an unhandled GroupResponse.
      Returns:
      the unhandled group response
    • error

      static GroupResponse error(Throwable throwable)
      Create an error GroupResponse with the given throwable.
      Parameters:
      throwable - the error cause
      Returns:
      the error group response
    • of

      static GroupResponse of(Throwable error, boolean handled, Group group)
      Create a GroupResponse with the given error, handled status, and group.
      Parameters:
      error - the error
      handled - whether it was handled
      group - the group
      Returns:
      the group response
    • error

      @Nullable default @Nullable Throwable error()
      Get the error when constructing or querying the group.
      Returns:
      the optional throwable error
    • handled

      default boolean handled()
      Check if the group query can be handled by the provider.
      Returns:
      true if handled, otherwise false
    • group

      @Nullable @Nullable Group group()
      Get the group interface object.
      Returns:
      the group interface object, or null if not handled or error