Class PlayerParty
java.lang.Object
de.simonsator.partyandfriends.api.party.PlayerParty
- Direct Known Subclasses:
LocalPlayerParty
Objects of this class are the party, where a player is in
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionabstract boolean
addPlayer
(OnlinePAFPlayer pPlayer) Adds a player to the partyprotected abstract void
addToInvited
(OnlinePAFPlayer pPlayer) protected abstract void
abstract int
Returns the size of the invitation listabstract OnlinePAFPlayer
Gets the leader of this partyabstract List<OnlinePAFPlayer>
Returns the "normal" players who are in the party.void
invite
(OnlinePAFPlayer pPlayer) Invites a player into this partyprotected abstract boolean
isAMember
(OnlinePAFPlayer pPlayer) abstract boolean
boolean
isInParty
(OnlinePAFPlayer pPlayer) Returns true if the player is in the party.boolean
isInvited
(OnlinePAFPlayer pPlayer) Returns true if the player is already invited or if the party is public.boolean
isLeader
(OnlinePAFPlayer player) abstract boolean
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 partyboolean
boolean
abstract boolean
void
kickPlayer
(OnlinePAFPlayer pPlayer) void
leaveParty
(OnlinePAFPlayer pPlayer) void
leaveParty
(PAFPlayer pPlayer) protected abstract boolean
needsNewLeader
(PAFPlayer pPlayer) void
removeFromInvited
(OnlinePAFPlayer pPlayer) abstract void
removeFromInvited
(PAFPlayer pPlayer) protected abstract void
removePlayerSilent
(PAFPlayer pPlayer) void
sendMessage
(String pText) void
sendMessage
(net.md_5.bungee.api.chat.TextComponent pText) abstract void
abstract void
setLeader
(OnlinePAFPlayer player) Sets the party leader.abstract void
setPrivateState
(boolean pIsPrivate)
-
Constructor Details
-
PlayerParty
public PlayerParty()
-
-
Method Details
-
isLeader
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
-
isBanned
-
setBanned
-
isPrivate
public abstract boolean isPrivate() -
setPrivateState
public abstract void setPrivateState(boolean pIsPrivate) -
isInParty
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
-
getInvited
-
isNobodyInvited
public boolean isNobodyInvited() -
getLeader
Gets the leader of this party- Returns:
- Returns the party leader
-
setLeader
Sets the party leader.- Parameters:
player
- The player
-
getAllPlayers
- Returns:
- Returns all players in this party (inclusive the leader).
-
removePlayerSilent
-
getPlayers
Returns the "normal" players who are in the party.- Returns:
- Returns the "normal" players who are in the party.
-
addPlayer
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
-
leaveParty
-
kickPlayer
-
invite
Invites a player into this party- Parameters:
pPlayer
- The player
-
removeFromInvited
-
removeFromInvited
-
addToInvited
-
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
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
-
needsNewLeader
-
findNewLeader
protected abstract void findNewLeader()
-