Interface PartiesHook

All Superinterfaces:
Hook

public interface PartiesHook extends Hook
Represents a class that hooks into a Parties system.

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.

  • Method Details

    • getCategory

      default HookCategory getCategory()
      Description copied from interface: Hook
      Get the category of the hook.
      Specified by:
      getCategory in interface Hook
      Returns:
      The category of the hook
    • getMember

      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.

      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 player
      callback - The callback containing the info about the player
    • getMember

      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.

      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 check
      callback - The callback containing the info about the player