Class Party
java.lang.Object
fr.prodrivers.bukkit.commons.parties.Party
Prodrivers Commons Party instance
-
Method Summary
Modifier and TypeMethodDescriptionbooleanAdds a player.voidSend a message to all party playersvoidSend a message to all party players, except some defined onesbooleancontainsPlayer(UUID playerUniqueId) Checks if a player is present in party list.voiddisband()Disband/Delete the party.voidelectOwner(UUID newOwner) Set a player as the new party ownerReturns owner's unique id.Returns party members.booleanisPartyOwner(UUID playerUniqueId) Checks if a player is the party ownerbooleanremovePlayer(UUID playerUniqueId) Removes a player.intsize()Returns the party's number of players.
-
Method Details
-
getOwnerUniqueId
Returns owner's unique id.- Returns:
- Owner's unique id
-
getPlayers
Returns party members.- Returns:
- List of party members
-
addPlayer
Adds a player.- Parameters:
playerUniqueId- Player to add's Unique ID- Returns:
trueif the player was added to the party
-
removePlayer
Removes a player.- Parameters:
playerUniqueId- Player to remove's Unique Id- Returns:
trueif the player was removed from the party
-
containsPlayer
Checks if a player is present in party list.- Parameters:
playerUniqueId- Player's Unique ID- Returns:
trueif the player is within the party list.
-
isPartyOwner
Checks if a player is the party owner- Parameters:
playerUniqueId- Player's Unique ID- Returns:
trueif the player is the party owner
-
electOwner
Set a player as the new party owner- Parameters:
newOwner- New owner
-
size
public int size()Returns the party's number of players.- Returns:
- Party's number of players
-
disband
public void disband()Disband/Delete the party. -
broadcast
Send a message to all party players- Parameters:
chat- Chat plugin to usemsg- Message to send
-
broadcast
Send a message to all party players, except some defined ones- Parameters:
chat- Chat plugin to usemsg- Message to sendexcluded- Players to be excluded from the broadcast
-