Interface PartiesHook
- All Superinterfaces:
Hook
Parties are basically groups that players may create to easily join together into an arena. MBedwars makes use of this by automatically teleporting all members once the leader joins an arena.
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic interface
Represents a member of a party.static interface
Represents a party that holds various members. -
Method Summary
Modifier and TypeMethodDescriptiondefault HookCategory
Get the category of the hook.void
getMember
(UUID playerUUID, Consumer<Optional<PartiesHook.Member>> callback) Asynchronously receive the info about a member and its party in which the player may be a part of.default void
getMember
(Player player, Consumer<Optional<PartiesHook.Member>> callback) Asynchronously receive the info about a member and its party in which the player may be a part of.Methods inherited from interface de.marcely.bedwars.api.hook.Hook
getHookedPlugin, getManagingPlugin, isActive
-
Method Details
-
getCategory
Description copied from interface:Hook
Get the category of the hook.- Specified by:
getCategory
in interfaceHook
- Returns:
- The category of the hook
-
getMember
Asynchronously receive the info about a member and its party in which the player may be a part of.The callback must not return on the main thread. This method may be called for both members and the leader. In case the player is not a part of a party, the callback returns
Optional.empty()
.The method must not return an instance that is being automatically updated! It may also just be a snapshot of when the method was called.
Warning for PaF Bungee: This plugin requires the player to be online on this server due to how it and the BungeeCord messaging system works.
- Parameters:
playerUUID
- The UUID of the playercallback
- The callback containing the info about the player
-
getMember
Asynchronously receive the info about a member and its party in which the player may be a part of.The callback must not return on the main thread. This method may be called for both members and the leader. In case the player is not a part of a party, the callback returns
Optional.empty()
.The method must not return an instance that is being automatically updated! It may also just be a snapshot of when the method was called.
Warning for PaF Bungee: This plugin requires the player to be online on this server due to how it and the BungeeCord messaging system works.
This method basically just calls
getMember(UUID, Consumer)
.- Parameters:
player
- The player we want to checkcallback
- The callback containing the info about the player
-