Class PartyManager
java.lang.Object
de.simonsator.partyandfriends.api.party.PartyManager
- All Implemented Interfaces:
Deactivated
- Direct Known Subclasses:
LocalPartyManager
This class manages the parties.
-
Field Summary
-
Constructor Summary
ModifierConstructorDescriptionprotected
Deprecated.protected
PartyManager
(long pInvitationTimeoutTime) -
Method Summary
Modifier and TypeMethodDescriptionabstract void
addPlayerToParty
(OnlinePAFPlayer player, PlayerParty party) Puts the player with the party in theHashMap
abstract PlayerParty
createParty
(OnlinePAFPlayer player) Creates a party if the player is not already in a party.protected abstract void
abstract void
deleteParty
(PlayerParty party) Deletes a party which is givenstatic PartyManager
getParty
(OnlinePAFPlayer player) Returns the party in which a player isabstract PlayerParty
A player cannot have an party when he is offline.void
abstract void
removePlayerFromParty
(PAFPlayer player) Removes the player party link from theHashMap
-
Field Details
-
INVITATION_TIMEOUT_TIME
public final long INVITATION_TIMEOUT_TIME
-
-
Constructor Details
-
PartyManager
Deprecated. -
PartyManager
protected PartyManager(long pInvitationTimeoutTime)
-
-
Method Details
-
getInstance
-
getParty
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
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
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
Deletes a party which is given- Parameters:
party
- The party
-
addPlayerToParty
Puts the player with the party in theHashMap
- Parameters:
player
- The Playerparty
- The Party
-
removePlayerFromParty
Removes the player party link from theHashMap
- Parameters:
player
- The Player
-
onDisable
public void onDisable()- Specified by:
onDisable
in interfaceDeactivated
-