Interface PartyPlayer
-
public interface PartyPlayer
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description default PartyAskRequestaskToJoin(@NotNull Party party)Ask to the party if the player can joinPartyAskRequestaskToJoin(@NotNull Party party, boolean sendMessages)Ask to the party if the player can join@NotNull StringgetName()Get the namedefault longgetNameTimestamp()Deprecated.Parties does not handle login timestamp anymore (use LastLoginAPI plugin instead)StringgetNickname()Get the nickname@Nullable UUIDgetPartyId()Get the party id@Nullable StringgetPartyName()Get the party nameSet<PartyAskRequest>getPendingAskRequests()Get a list of pending ask requestsSet<PartyInvite>getPendingInvites()Get a list of pending invite requests@NotNull UUIDgetPlayerUUID()Get the playerUUIDintgetRank()Get the rank leveldefault booleanisInParty()Is the player inside a party?booleanisMuted()Is the player muted?booleanisSpy()Is the player a spy?voidsetMuted(boolean value)Toggle player mutedefault voidsetName(String name)Deprecated.Parties does not handle player names anymore (use LastLoginAPI plugin instead)default voidsetNameTimestamp(long nameTimestamp)Deprecated.Parties does not handle login timestamp anymore (use LastLoginAPI plugin instead)voidsetNickname(String nickname)Set the nicknamevoidsetPartyId(@Nullable UUID partyId)Set the party iddefault voidsetPartyName(String partyName)Deprecated.use setPartyId insteadvoidsetRank(int rank)Set the rank levelvoidsetSpy(boolean value)Set the player as a spy
-
-
-
Method Detail
-
getPlayerUUID
@NotNull @NotNull UUID getPlayerUUID()
Get the playerUUID- Returns:
- the
UUIDof the player
-
getName
@NotNull @NotNull String getName()
Get the name- Returns:
- the name of the player
-
isInParty
default boolean isInParty()
Is the player inside a party?- Returns:
- true if the player is inside a party
-
getPartyId
@Nullable @Nullable UUID getPartyId()
Get the party id- Returns:
- the
UUIDof the party, null if the player is not in a party
-
getPartyName
@Nullable @Nullable String getPartyName()
Get the party name- Returns:
- the party name, null if the player is not in a party
-
setPartyId
void setPartyId(@Nullable @Nullable UUID partyId)Set the party id- Parameters:
partyId- the party id to set
-
setPartyName
@Deprecated default void setPartyName(String partyName)
Deprecated.use setPartyId insteadSet the party name- Parameters:
partyName- the party name to set
-
getRank
int getRank()
Get the rank level- Returns:
- the rank level
-
setRank
void setRank(int rank)
Set the rank level- Parameters:
rank- the rank level to set
-
getNickname
String getNickname()
Get the nickname- Returns:
- the nickname
-
setNickname
void setNickname(String nickname)
Set the nickname- Parameters:
nickname- the nickname to set
-
getPendingInvites
Set<PartyInvite> getPendingInvites()
Get a list of pending invite requests- Returns:
- a set of
PartyInvite
-
getPendingAskRequests
Set<PartyAskRequest> getPendingAskRequests()
Get a list of pending ask requests- Returns:
- a set of
PartyAskRequest
-
isSpy
boolean isSpy()
Is the player a spy?- Returns:
- true if the player is a spy
-
setSpy
void setSpy(boolean value)
Set the player as a spy- Parameters:
value- true to be a spy
-
isMuted
boolean isMuted()
Is the player muted?- Returns:
- true if the player is muted
-
setMuted
void setMuted(boolean value)
Toggle player mute- Parameters:
value- true to mute notifications
-
setName
@Deprecated default void setName(String name)
Deprecated.Parties does not handle player names anymore (use LastLoginAPI plugin instead)Set the name- Parameters:
name- the name to set
-
getNameTimestamp
@Deprecated default long getNameTimestamp()
Deprecated.Parties does not handle login timestamp anymore (use LastLoginAPI plugin instead)Get the name timestamp- Returns:
- the name timestamp
-
setNameTimestamp
@Deprecated default void setNameTimestamp(long nameTimestamp)
Deprecated.Parties does not handle login timestamp anymore (use LastLoginAPI plugin instead)Set the name timestamp- Parameters:
nameTimestamp- the timestamp to set
-
askToJoin
default PartyAskRequest askToJoin(@NotNull @NotNull Party party)
Ask to the party if the player can join- Parameters:
party- thePartyto ask- Returns:
- the
PartyAskRequestinstance
-
askToJoin
PartyAskRequest askToJoin(@NotNull @NotNull Party party, boolean sendMessages)
Ask to the party if the player can join- Parameters:
party- thePartyPlayerto asksendMessages- true if the event should send messages to players- Returns:
- the
PartyAskRequestinstance
-
-