public interface Party
Modifier and Type | Method and Description |
---|---|
boolean |
addMember(@NotNull PartyPlayer partyPlayer)
Add the player to the party
|
void |
broadcastMessage(@NotNull String message,
@Nullable PartyPlayer player)
Send a broadcast message to the party.
|
void |
changeLeader(@NotNull PartyPlayer leaderPartyPlayer)
Change the party leader
|
void |
delete()
Delete the party
|
Set<PartyAskRequest> |
getAskRequests()
Get a list of pending ask requests
|
@Nullable PartyColor |
getColor()
Get the party color
|
@Nullable String |
getDescription()
Get the party description
|
double |
getExperience()
Get the party experience
|
default PartyHome |
getHome()
Deprecated.
use
getHomes() instead |
@NotNull Set<PartyHome> |
getHomes()
Get the set of homes of the party
|
@NotNull UUID |
getId()
Get the party id
|
Set<PartyInvite> |
getInviteRequests()
Get a list of pending invite requests
|
int |
getKills()
Get the kills number of the party
|
@Nullable UUID |
getLeader()
Get the party leader
|
int |
getLevel()
Get the current party level
|
double |
getLevelExperience()
Get the total experience of the current level
|
double |
getLevelUpCurrent()
Get the current party level experience.
|
double |
getLevelUpNecessary()
Get the experience required to level up the party
|
@NotNull Set<UUID> |
getMembers()
Get a list of party members.
|
@Nullable String |
getMotd()
Get the Message Of The Day of the party
|
@Nullable String |
getName()
Get the party name
|
default @NotNull Set<PartyPlayer> |
getOnlineMembers()
Get a list of online members
|
@NotNull Set<PartyPlayer> |
getOnlineMembers(boolean bypassVanish)
Get a list of online members
|
@Nullable String |
getPassword()
Get the party password
|
boolean |
getProtection()
Get the party friendly fire protection
|
@Nullable String |
getTag()
Get the party tag
|
default void |
giveExperience(double experience)
Give party experience
|
void |
giveExperience(double experience,
boolean gainMessage)
Give party experience.
|
default PartyInvite |
invitePlayer(@NotNull PartyPlayer partyPlayer)
Invite the player into the party
|
default PartyInvite |
invitePlayer(@NotNull PartyPlayer partyPlayer,
@Nullable PartyPlayer inviter)
Invite the player into the party
|
PartyInvite |
invitePlayer(@NotNull PartyPlayer partyPlayer,
@Nullable PartyPlayer inviter,
boolean sendMessages)
Invite the player into the party
|
boolean |
isFixed()
Is the party fixed?
|
boolean |
isFollowEnabled()
Check if the party have the follow option enabled
|
boolean |
isFriendlyFireProtected()
Check if the party is protected from friendly fire using both
command and global protection.
|
boolean |
isFull()
Is the party full?
|
boolean |
isOpen()
Is the party open to players?
|
boolean |
removeMember(@NotNull PartyPlayer partyPlayer)
Remove the player from the party
|
void |
rename(@Nullable String newName)
Rename the party
|
void |
setColor(@Nullable PartyColor color)
Set the party color
|
void |
setDescription(@Nullable String description)
Set the party description
|
void |
setExperience(double experience)
Set the party experience
|
void |
setFixed(boolean fixed,
@Nullable PartyPlayer newLeader)
Toggle a fixed party
|
void |
setFollowEnabled(boolean follow)
Set the party follow option
|
default void |
setHome(@Nullable PartyHome home)
Deprecated.
use
setHomes(...) instead |
void |
setHomes(@NotNull Set<PartyHome> homes)
Set the set of homes of the party
|
void |
setKills(int kills)
Set the number of kills of the party
|
void |
setMotd(@Nullable String motd)
Set the Message Of The Day of the party
|
default void |
setName(String name)
Deprecated.
use rename(String)
|
void |
setOpen(boolean open)
Set the party as open
|
void |
setPassword(@Nullable String password)
Set the party password
|
boolean |
setPasswordUnhashed(@Nullable String password)
Set the party password unhashed, the plugin will hash it
|
void |
setProtection(boolean protection)
Set the party friendly fire protection
|
void |
setTag(@Nullable String tag)
Set the party tag
|
@NotNull @NotNull UUID getId()
@Nullable @Nullable String getName()
void delete()
void rename(@Nullable @Nullable String newName)
newName
- the name to set@Deprecated default void setName(String name)
name
- the name to set@NotNull @NotNull Set<UUID> getMembers()
@NotNull default @NotNull Set<PartyPlayer> getOnlineMembers()
Set<PartyPlayer>
@NotNull @NotNull Set<PartyPlayer> getOnlineMembers(boolean bypassVanish)
bypassVanish
- bypass player with vanish?Set<PartyPlayer>
boolean addMember(@NotNull @NotNull PartyPlayer partyPlayer)
partyPlayer
- the PartyPlayer
to addboolean removeMember(@NotNull @NotNull PartyPlayer partyPlayer)
partyPlayer
- the PartyPlayer
to removeSet<PartyInvite> getInviteRequests()
PartyInvite
default PartyInvite invitePlayer(@NotNull @NotNull PartyPlayer partyPlayer)
partyPlayer
- the PartyPlayer
to invitePartyInvite
instancedefault PartyInvite invitePlayer(@NotNull @NotNull PartyPlayer partyPlayer, @Nullable @Nullable PartyPlayer inviter)
partyPlayer
- the PartyPlayer
to inviteinviter
- the PartyPlayer
who is inviting partyPlayerPartyInvite
instancePartyInvite invitePlayer(@NotNull @NotNull PartyPlayer partyPlayer, @Nullable @Nullable PartyPlayer inviter, boolean sendMessages)
partyPlayer
- the PartyPlayer
to inviteinviter
- the PartyPlayer
who is inviting partyPlayersendMessages
- true if the event should send messages to playersPartyInvite
instanceSet<PartyAskRequest> getAskRequests()
PartyAskRequest
boolean isFull()
@Nullable @Nullable UUID getLeader()
UUID
of the party leader, can be magic if the party is fixedvoid changeLeader(@NotNull @NotNull PartyPlayer leaderPartyPlayer)
leaderPartyPlayer
- the PartyPlayer
to promote as leaderboolean isFixed()
void setFixed(boolean fixed, @Nullable @Nullable PartyPlayer newLeader)
fixed
- true
to be fixednewLeader
- new leader to set, null if setting Party as fixed@Nullable @Nullable String getTag()
void setTag(@Nullable @Nullable String tag)
tag
- the tag of the party@Nullable @Nullable String getDescription()
void setDescription(@Nullable @Nullable String description)
description
- the description of the party@Nullable @Nullable String getMotd()
void setMotd(@Nullable @Nullable String motd)
motd
- the MOTD of the party@NotNull @NotNull Set<PartyHome> getHomes()
Set<PartyHome>
of the partyvoid setHomes(@NotNull @NotNull Set<PartyHome> homes)
homes
- the Set<PartyHome>
of the party@Deprecated default PartyHome getHome()
getHomes()
insteadPartyHome
of the party@Deprecated default void setHome(@Nullable @Nullable PartyHome home)
setHomes(...)
insteadhome
- the new party home@Nullable @Nullable PartyColor getColor()
Color
of the partyvoid setColor(@Nullable @Nullable PartyColor color)
color
- the Color
of the partyint getKills()
void setKills(int kills)
kills
- the number of kills of the partyboolean isOpen()
void setOpen(boolean open)
open
- true for open@Nullable @Nullable String getPassword()
void setPassword(@Nullable @Nullable String password)
password
- the password of the party, HASHEDboolean setPasswordUnhashed(@Nullable @Nullable String password)
password
- the password of the partyboolean getProtection()
void setProtection(boolean protection)
protection
- true if you want protect the partyboolean isFriendlyFireProtected()
double getExperience()
void setExperience(double experience)
experience
- the experience number to setdefault void giveExperience(double experience)
experience
- the experience number to givevoid giveExperience(double experience, boolean gainMessage)
experience
- the experience number to givegainMessage
- should the gain message be sent or notint getLevel()
double getLevelExperience()
double getLevelUpCurrent()
double getLevelUpNecessary()
void setFollowEnabled(boolean follow)
follow
- true if you want enable follow optionboolean isFollowEnabled()
void broadcastMessage(@NotNull @NotNull String message, @Nullable @Nullable PartyPlayer player)
message
- the message to broadcastplayer
- the PartyPlayer
who sent the messageCopyright © 2023. All rights reserved.