Class PartyManager

  • All Implemented Interfaces:
    Deactivated

    public abstract class PartyManager
    extends java.lang.Object
    implements Deactivated
    This class manages the parties.
    • Constructor Detail

      • PartyManager

        protected PartyManager()
    • Method Detail

      • 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​(java.util.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