Class PlayerParty


  • public abstract class PlayerParty
    extends java.lang.Object
    Objects of this class are the party, where a player is in
    • Constructor Detail

      • PlayerParty

        public PlayerParty()
    • Method Detail

      • isLeader

        public boolean isLeader​(PAFPlayer player)
        Returns true if the given player is the leader of this party, and it will returns false if he is not the leader, of this party
        Parameters:
        player - The player
        Returns:
        Returns a true if the given player is the leader of this party, and it will returns false if he is not the leader, of this party
      • isBanned

        public abstract boolean isBanned​(PAFPlayer pPlayer)
      • setBanned

        public abstract void setBanned​(PAFPlayer pPlayer,
                                       boolean pIsBanned)
      • isPrivate

        public abstract boolean isPrivate()
      • setPrivateState

        public abstract void setPrivateState​(boolean pIsPrivate)
      • isInParty

        public boolean isInParty​(OnlinePAFPlayer pPlayer)
        Returns true if the player is in the party. Returns false if the player is not in the party.
        Parameters:
        pPlayer - The player
        Returns:
        Returns true if the player is in the party. Returns false if the player is not in the party.
      • isAMember

        protected abstract boolean isAMember​(OnlinePAFPlayer pPlayer)
      • getInvited

        protected abstract java.util.List<java.util.UUID> getInvited()
      • isNobodyInvited

        public boolean isNobodyInvited()
      • getLeader

        public abstract OnlinePAFPlayer getLeader()
        Gets the leader of this party
        Returns:
        Returns the party leader
      • setLeader

        public abstract void setLeader​(OnlinePAFPlayer player)
        Sets the party leader.
        Parameters:
        player - The player
      • getAllPlayers

        public java.util.List<OnlinePAFPlayer> getAllPlayers()
        Returns:
        Returns all players in this party (inclusive the leader).
      • removePlayerSilent

        protected abstract void removePlayerSilent​(PAFPlayer pPlayer)
      • getPlayers

        public abstract java.util.List<OnlinePAFPlayer> getPlayers()
        Returns the "normal" players who are in the party.
        Returns:
        Returns the "normal" players who are in the party.
      • addPlayer

        public abstract boolean addPlayer​(OnlinePAFPlayer pPlayer)
        Adds a player to the party
        Parameters:
        pPlayer - The player
        Returns:
        Returns true if the player was added to this party. Returns false if the player was not added to this party
      • leaveParty

        public void leaveParty​(PAFPlayer pPlayer)
      • invite

        public void invite​(OnlinePAFPlayer pPlayer)
        Invites a player into this party
        Parameters:
        pPlayer - The player
      • removeFromInvited

        public abstract void removeFromInvited​(PAFPlayer pPlayer)
      • removeFromInvited

        public void removeFromInvited​(OnlinePAFPlayer pPlayer)
      • addToInvited

        protected abstract void addToInvited​(OnlinePAFPlayer pPlayer)
      • getInviteListSize

        public abstract int getInviteListSize()
        Returns the size of the invitation list
        Returns:
        Returns the size of the invitation list
      • isInvited

        public boolean isInvited​(OnlinePAFPlayer pPlayer)
        Returns true if the player is already invited or if the party is public. Returns false if the player is not invited.
        Parameters:
        pPlayer - The player
        Returns:
        Returns true if the player is already invited. Returns false if the player is not invited.
      • sendMessage

        public void sendMessage​(net.md_5.bungee.api.chat.TextComponent pText)
      • sendMessage

        public void sendMessage​(java.lang.String pText)
      • needsNewLeader

        protected abstract boolean needsNewLeader​(PAFPlayer pPlayer)
      • findNewLeader

        protected abstract void findNewLeader()