Class PartyManager

java.lang.Object
fr.prodrivers.bukkit.commons.parties.PartyManager

public class PartyManager extends Object
Prodrivers Commons Party Manager. Allows to interect with Prodrivers Commons global parties. Invites, kick, disband and others are directly handled by the plugin.
  • Constructor Details

    • PartyManager

      public PartyManager()
  • Method Details

    • isInParty

      public static boolean isInParty(UUID playerUniqueId)
      Checks if given player is in a party.
      Parameters:
      playerUniqueId - Player unique ID
      Returns:
      true if the player is in a party
    • getParty

      public static Party getParty(UUID playerUniqueId)
      Get player's party.
      Parameters:
      playerUniqueId - Player Unqiue ID
      Returns:
      Player's party
    • getParties

      public static Iterable<Party> getParties()
      Returns all known parties.
      Returns:
      Parties
    • createParty

      public static Party createParty(UUID ownerUniqueId)
      Creates a new party.
      Parameters:
      ownerUniqueId - Party owner
      Returns:
      New party instance
    • addPartyInvite

      public static void addPartyInvite(UUID invitedPlayerUniqueId, Party party)
      Invites a player to a party
      Parameters:
      invitedPlayerUniqueId - Invited player
      party - Associated party
    • hasPartyInvites

      public static boolean hasPartyInvites(UUID invitedPlayerUniqueId)
      Checks if the player has pending party invitations.
      Parameters:
      invitedPlayerUniqueId - Invited player's Unique ID
      Returns:
      true if the player has pending party invites.
    • getPartyInvites

      public static Iterable<Party> getPartyInvites(UUID invitedPlayerUniqueId)
      Get parties on which the player has pending party invitations.
      Parameters:
      invitedPlayerUniqueId - Invited player's Unique ID
      Returns:
      Parties that sent an invitation to the specified player
    • removePartyInvites

      public static void removePartyInvites(UUID invitedPlayerUniqueId)
      Removes all pending party invitations for a player.
      Parameters:
      invitedPlayerUniqueId - Invited player's Unique ID