Class PartyManager
java.lang.Object
fr.prodrivers.bukkit.commons.parties.PartyManager
Prodrivers Commons Party Manager.
Allows to interect with Prodrivers Commons global parties.
Invites, kick, disband and others are directly handled by the plugin.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidaddPartyInvite(UUID invitedPlayerUniqueId, Party party) Invites a player to a partystatic PartycreateParty(UUID ownerUniqueId) Creates a new party.Returns all known parties.static PartyGet player's party.getPartyInvites(UUID invitedPlayerUniqueId) Get parties on which the player has pending party invitations.static booleanhasPartyInvites(UUID invitedPlayerUniqueId) Checks if the player has pending party invitations.static booleanChecks if given player is in a party.static voidremovePartyInvites(UUID invitedPlayerUniqueId) Removes all pending party invitations for a player.
-
Constructor Details
-
PartyManager
public PartyManager()
-
-
Method Details
-
isInParty
Checks if given player is in a party.- Parameters:
playerUniqueId- Player unique ID- Returns:
trueif the player is in a party
-
getParty
Get player's party.- Parameters:
playerUniqueId- Player Unqiue ID- Returns:
- Player's party
-
getParties
Returns all known parties.- Returns:
- Parties
-
createParty
Creates a new party.- Parameters:
ownerUniqueId- Party owner- Returns:
- New party instance
-
addPartyInvite
Invites a player to a party- Parameters:
invitedPlayerUniqueId- Invited playerparty- Associated party
-
hasPartyInvites
Checks if the player has pending party invitations.- Parameters:
invitedPlayerUniqueId- Invited player's Unique ID- Returns:
trueif the player has pending party invites.
-
getPartyInvites
Get parties on which the player has pending party invitations.- Parameters:
invitedPlayerUniqueId- Invited player's Unique ID- Returns:
- Parties that sent an invitation to the specified player
-
removePartyInvites
Removes all pending party invitations for a player.- Parameters:
invitedPlayerUniqueId- Invited player's Unique ID
-