Class PartyManager

java.lang.Object
de.simonsator.partyandfriends.api.party.PartyManager
All Implemented Interfaces:
Deactivated
Direct Known Subclasses:
LocalPartyManager

public abstract class PartyManager extends Object implements Deactivated
This class manages the parties.
  • Field Details

    • INVITATION_TIMEOUT_TIME

      public final long INVITATION_TIMEOUT_TIME
  • Constructor Details

    • PartyManager

      @Deprecated protected PartyManager()
      Deprecated.
    • PartyManager

      protected PartyManager(long pInvitationTimeoutTime)
  • Method Details

    • getInstance

      public static PartyManager getInstance()
    • getParty

      public PlayerParty getParty(OnlinePAFPlayer player)
      Returns the party in which a player is
      Parameters:
      player - The player
      Returns:
      Returns the party in which a player is or null if he isn't in a party.
    • getParty

      public abstract PlayerParty getParty(UUID pUUID)
      A player cannot have an party when he is offline. This is only for the case that the player has left the server before the async disconnect was executed
      Parameters:
      pUUID - The uuid of the player
      Returns:
      Returns the party of the player, if he has one, else it is returning null.
    • createParty

      public abstract PlayerParty createParty(OnlinePAFPlayer player)
      Creates a party if the player is not already in a party.
      Parameters:
      player - The player
      Returns:
      Returns true if the party was created or false if not
    • deleteAllParties

      protected abstract void deleteAllParties()
    • deleteParty

      public abstract void deleteParty(PlayerParty party)
      Deletes a party which is given
      Parameters:
      party - The party
    • addPlayerToParty

      public abstract void addPlayerToParty(OnlinePAFPlayer player, PlayerParty party)
      Puts the player with the party in the HashMap
      Parameters:
      player - The Player
      party - The Party
    • removePlayerFromParty

      public abstract void removePlayerFromParty(PAFPlayer player)
      Removes the player party link from the HashMap
      Parameters:
      player - The Player
    • onDisable

      public void onDisable()
      Specified by:
      onDisable in interface Deactivated