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 Summary
Modifier and TypeMethodDescriptiondefault @Nullable Throwableerror()Get the error when constructing or querying the group.static GroupResponseCreate an errorGroupResponsewith the given throwable.@Nullable Groupgroup()Get the group interface object.default booleanhandled()Check if the group query can be handled by the provider.static GroupResponseCreate a handledGroupResponsewith the given group.static GroupResponseCreate an unhandledGroupResponse.static GroupResponseCreate a handledGroupResponsewith the given group.static GroupResponseCreate aGroupResponsewith the given error, handled status, and group.
-
Method Details
-
of
Create a handledGroupResponsewith the given group.- Parameters:
group- the group- Returns:
- the group response
-
handled
Create a handledGroupResponsewith the given group.- Parameters:
group- the group- Returns:
- the group response
-
notHandled
Create an unhandledGroupResponse.- Returns:
- the unhandled group response
-
error
Create an errorGroupResponsewith the given throwable.- Parameters:
throwable- the error cause- Returns:
- the error group response
-
of
Create aGroupResponsewith the given error, handled status, and group.- Parameters:
error- the errorhandled- whether it was handledgroup- the group- Returns:
- the group response
-
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
Get the group interface object.- Returns:
- the group interface object, or null if not handled or error
-