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
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedDeprecated.protectedPartyManager(long pInvitationTimeoutTime) -
Method Summary
Modifier and TypeMethodDescriptionabstract voidaddPlayerToParty(OnlinePAFPlayer player, PlayerParty party) Puts the player with the party in theHashMapabstract PlayerPartycreateParty(OnlinePAFPlayer player) Creates a party if the player is not already in a party.protected abstract voidabstract voiddeleteParty(PlayerParty party) Deletes a party which is givenstatic PartyManagergetParty(OnlinePAFPlayer player) Returns the party in which a player isabstract PlayerPartyA player cannot have an party when he is offline.voidabstract voidremovePlayerFromParty(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:
onDisablein interfaceDeactivated
-