Class PlayerParty

java.lang.Object
de.simonsator.partyandfriends.api.party.PlayerParty
Direct Known Subclasses:
LocalPlayerParty

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

    • PlayerParty

      public PlayerParty()
  • Method Details

    • isLeader

      public abstract 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
    • isLeader

      public boolean isLeader(OnlinePAFPlayer player)
    • 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 List<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 List<OnlinePAFPlayer> getAllPlayers()
      Returns:
      Returns all players in this party (inclusive the leader).
    • removePlayerSilent

      protected abstract void removePlayerSilent(PAFPlayer pPlayer)
    • getPlayers

      public abstract 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(OnlinePAFPlayer pPlayer)
    • leaveParty

      public void leaveParty(PAFPlayer pPlayer)
    • kickPlayer

      public void kickPlayer(OnlinePAFPlayer 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)
    • isPartyEmpty

      public boolean isPartyEmpty()
    • 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(String pText)
    • needsNewLeader

      protected abstract boolean needsNewLeader(PAFPlayer pPlayer)
    • findNewLeader

      protected abstract void findNewLeader()