Interface Party
public interface Party
-
Method Summary
Modifier and TypeMethodDescriptionbooleanaddMember(@NotNull PartyPlayer partyPlayer) Add the player to the partyvoidbroadcastMessage(@NotNull String message, @Nullable PartyPlayer player) Send a broadcast message to the party.voidchangeLeader(@NotNull PartyPlayer leaderPartyPlayer) Change the party leadervoiddelete()Delete the partyGet a list of pending ask requests@Nullable PartyColorgetColor()Get the party color@Nullable StringGet the party descriptiondoubleGet the party experiencedefault PartyHomegetHome()Deprecated.getHomes()Get the set of homes of the party@NotNull UUIDgetId()Get the party idGet a list of pending invite requestsintgetKills()Get the kills number of the party@Nullable UUIDGet the party leaderintgetLevel()Get the current party leveldoubleGet the total experience of the current leveldoubleGet the current party level experience.doubleGet the experience required to level up the partyGet a list of party members.@Nullable StringgetMotd()Get the Message Of The Day of the party@Nullable StringgetName()Get the party namedefault @NotNull Set<PartyPlayer>Get a list of online members@NotNull Set<PartyPlayer>getOnlineMembers(boolean bypassVanish) Get a list of online members@Nullable StringGet the party passwordbooleanGet the party friendly fire protection@Nullable StringgetTag()Get the party tagdefault voidgiveExperience(double experience) Give party experiencevoidgiveExperience(double experience, boolean gainMessage) Give party experience.default PartyInviteinvitePlayer(@NotNull PartyPlayer partyPlayer) Invite the player into the partydefault PartyInviteinvitePlayer(@NotNull PartyPlayer partyPlayer, @Nullable PartyPlayer inviter) Invite the player into the partyinvitePlayer(@NotNull PartyPlayer partyPlayer, @Nullable PartyPlayer inviter, boolean sendMessages) Invite the player into the partybooleanisFixed()Is the party fixed?booleanCheck if the party have the follow option enabledbooleanCheck if the party is protected from friendly fire using both command and global protection.booleanisFull()Is the party full?booleanisOpen()Is the party open to players?booleanremoveMember(@NotNull PartyPlayer partyPlayer) Remove the player from the partyvoidRename the partyvoidsetColor(@Nullable PartyColor color) Set the party colorvoidsetDescription(@Nullable String description) Set the party descriptionvoidsetExperience(double experience) Set the party experiencevoidsetFixed(boolean fixed, @Nullable PartyPlayer newLeader) Toggle a fixed partyvoidsetFollowEnabled(boolean follow) Set the party follow optiondefault voidDeprecated.usesetHomes(...)insteadvoidSet the set of homes of the partyvoidsetKills(int kills) Set the number of kills of the partyvoidSet the Message Of The Day of the partydefault voidDeprecated.use rename(String)voidsetOpen(boolean open) Set the party as openvoidsetPassword(@Nullable String password) Set the party passwordbooleansetPasswordUnhashed(@Nullable String password) Set the party password unhashed, the plugin will hash itvoidsetProtection(boolean protection) Set the party friendly fire protectionvoidSet the party tag
-
Method Details
-
getId
Get the party id- Returns:
- the id of the party
-
getName
Get the party name- Returns:
- the name of the party
-
delete
void delete()Delete the party -
rename
Rename the party- Parameters:
newName- the name to set
-
setName
Deprecated.use rename(String)Set the party name- Parameters:
name- the name to set
-
getMembers
Get a list of party members. It will contains members of every rank, leader too.- Returns:
- the members sub of the party
-
getOnlineMembers
Get a list of online members- Returns:
- an unmodifiable
Set<PartyPlayer>
-
getOnlineMembers
Get a list of online members- Parameters:
bypassVanish- bypass player with vanish?- Returns:
- an unmodifiable
Set<PartyPlayer>
-
addMember
Add the player to the party- Parameters:
partyPlayer- thePartyPlayerto add- Returns:
- true if successfully added
-
removeMember
Remove the player from the party- Parameters:
partyPlayer- thePartyPlayerto remove- Returns:
- true if successfully removed
-
getInviteRequests
Set<PartyInvite> getInviteRequests()Get a list of pending invite requests- Returns:
- a set of
PartyInvite
-
invitePlayer
Invite the player into the party- Parameters:
partyPlayer- thePartyPlayerto invite- Returns:
- the
PartyInviteinstance
-
invitePlayer
default PartyInvite invitePlayer(@NotNull @NotNull PartyPlayer partyPlayer, @Nullable @Nullable PartyPlayer inviter) Invite the player into the party- Parameters:
partyPlayer- thePartyPlayerto inviteinviter- thePartyPlayerwho is inviting partyPlayer- Returns:
- the
PartyInviteinstance
-
invitePlayer
PartyInvite invitePlayer(@NotNull @NotNull PartyPlayer partyPlayer, @Nullable @Nullable PartyPlayer inviter, boolean sendMessages) Invite the player into the party- Parameters:
partyPlayer- thePartyPlayerto inviteinviter- thePartyPlayerwho is inviting partyPlayersendMessages- true if the event should send messages to players- Returns:
- the
PartyInviteinstance
-
getAskRequests
Set<PartyAskRequest> getAskRequests()Get a list of pending ask requests- Returns:
- a set of
PartyAskRequest
-
isFull
boolean isFull()Is the party full?- Returns:
- true if the party is full
-
getLeader
Get the party leader- Returns:
- the
UUIDof the party leader, can be magic if the party is fixed
-
changeLeader
Change the party leader- Parameters:
leaderPartyPlayer- thePartyPlayerto promote as leader
-
isFixed
boolean isFixed()Is the party fixed?- Returns:
- true if the party is fixed
-
setFixed
Toggle a fixed party- Parameters:
fixed-trueto be fixednewLeader- new leader to set, null if setting Party as fixed
-
getTag
Get the party tag- Returns:
- the party tag
-
setTag
Set the party tag- Parameters:
tag- the tag of the party
-
getDescription
Get the party description- Returns:
- the party description
-
setDescription
Set the party description- Parameters:
description- the description of the party
-
getMotd
Get the Message Of The Day of the party- Returns:
- the MOTD of the party
-
setMotd
Set the Message Of The Day of the party- Parameters:
motd- the MOTD of the party
-
getHomes
Get the set of homes of the party- Returns:
- the
Set<PartyHome>of the party
-
setHomes
Set the set of homes of the party- Parameters:
homes- theSet<PartyHome>of the party
-
getHome
Deprecated.usegetHomes()instead- Returns:
- the
PartyHomeof the party
-
setHome
Deprecated.usesetHomes(...)instead- Parameters:
home- the new party home
-
getColor
Get the party color- Returns:
- the
Colorof the party
-
setColor
Set the party color- Parameters:
color- theColorof the party
-
getKills
int getKills()Get the kills number of the party- Returns:
- the number of kills of the party
-
setKills
void setKills(int kills) Set the number of kills of the party- Parameters:
kills- the number of kills of the party
-
isOpen
boolean isOpen()Is the party open to players?- Returns:
- true if its open
-
setOpen
void setOpen(boolean open) Set the party as open- Parameters:
open- true for open
-
getPassword
Get the party password- Returns:
- the password of the party, HASHED
-
setPassword
Set the party password- Parameters:
password- the password of the party, HASHED
-
setPasswordUnhashed
Set the party password unhashed, the plugin will hash it- Parameters:
password- the password of the party- Returns:
- true if the password is valid
-
getProtection
boolean getProtection()Get the party friendly fire protection- Returns:
- true if the party is protected
-
setProtection
void setProtection(boolean protection) Set the party friendly fire protection- Parameters:
protection- true if you want protect the party
-
isFriendlyFireProtected
boolean isFriendlyFireProtected()Check if the party is protected from friendly fire using both command and global protection. Use this if you just want to check for FF.- Returns:
- true if pvp between players is protected
-
getExperience
double getExperience()Get the party experience- Returns:
- the total experience of the party
-
setExperience
void setExperience(double experience) Set the party experience- Parameters:
experience- the experience number to set
-
giveExperience
default void giveExperience(double experience) Give party experience- Parameters:
experience- the experience number to give
-
giveExperience
void giveExperience(double experience, boolean gainMessage) Give party experience. Choose to send the gain message or not.- Parameters:
experience- the experience number to givegainMessage- should the gain message be sent or not
-
getLevel
int getLevel()Get the current party level- Returns:
- the calculated level of the party
-
getLevelExperience
double getLevelExperience()Get the total experience of the current level- Returns:
- the total experience of the current level
-
getLevelUpCurrent
double getLevelUpCurrent()Get the current party level experience. How many experience of the current level- Returns:
- the current level experience of the party
-
getLevelUpNecessary
double getLevelUpNecessary()Get the experience required to level up the party- Returns:
- the experience required to level up the party
-
setFollowEnabled
void setFollowEnabled(boolean follow) Set the party follow option- Parameters:
follow- true if you want enable follow option
-
isFollowEnabled
boolean isFollowEnabled()Check if the party have the follow option enabled- Returns:
- true if follow option is enabled
-
broadcastMessage
Send a broadcast message to the party. It requires a player to send the message because Parties gets the placeholder info from the player. The player can be null if its a general broadcast.- Parameters:
message- the message to broadcastplayer- thePartyPlayerwho sent the message
-
getHomes()instead