Interface PartiesAPI
-
public interface PartiesAPI
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description default StatusaddPlayerIntoParty(PartyPlayer player, Party party)Deprecated.use Party.addMember(PartyPlayer) insteadbooleanareInTheSameParty(UUID player1, UUID player2)Check if the given players are in the same partydefault voidbroadcastPartyMessage(Party party, PartyPlayer player, String message)Deprecated.use Party.broadcastMessage(String, PartyPlayer) insteadbooleancreateParty(@Nullable String party, @Nullable PartyPlayer leader)Create a partydefault StatusdeleteParty(Party party)Deprecated.use Party.delete() instead@NotNull Set<PartyColor>getColors()Get the list of available colors@NotNull List<Party>getOnlineParties()Get online partiesdefault Set<PartyPlayer>getOnlinePlayers(Party party)Deprecated.use Party.getOnlineMembers(boolean) insteadPartiesOptionsgetOptions()Get main plugin options@NotNull LinkedList<Party>getPartiesListByExperience(int numberOfParties, int offset)Get list of parties ordered by number of experience@NotNull LinkedList<Party>getPartiesListByKills(int numberOfParties, int offset)Get list of parties ordered by number of kills@NotNull LinkedList<Party>getPartiesListByMembers(int numberOfParties, int offset)Get list of parties ordered by number of members@NotNull LinkedList<Party>getPartiesListByName(int numberOfParties, int offset)Get list of parties ordered by name@NotNull LinkedList<Party>getPartiesListByOnlineMembers(int numberOfParties, int offset)Get list of parties ordered by number of online members@Nullable PartygetParty(@NotNull String party)Get the party by its name@Nullable PartygetParty(@NotNull UUID party)Get the party by its id@Nullable PartygetPartyOfPlayer(@NotNull UUID uuid)Get the party of the player@Nullable PartyPlayergetPartyPlayer(@NotNull UUID uuid)Get the player by hisUUID@NotNull Set<PartyRank>getRanks()Get the list of available ranksbooleanisBungeeCordEnabled()Check if the plugin have BungeeCord option enableddefault booleanisPlayerInParty(UUID player)Is the player in a party?default voidrefreshOnlinePlayers(Party party)Deprecated.no longer neededdefault voidreloadParties()Deprecated.use reloadPlugin() insteadvoidreloadPlugin()Reload Parties configuration filesdefault StatusremovePlayerFromParty(PartyPlayer player)Deprecated.use Party.removeMember(PartyPlayer) insteaddefault voidupdateParty(Party party)Deprecated.no longer neededdefault voidupdatePartyPlayer(PartyPlayer player)Deprecated.no longer needed
-
-
-
Method Detail
-
getOptions
PartiesOptions getOptions()
Get main plugin options- Returns:
- the
PartiesOptions
-
reloadPlugin
void reloadPlugin()
Reload Parties configuration files
-
isBungeeCordEnabled
boolean isBungeeCordEnabled()
Check if the plugin have BungeeCord option enabled- Returns:
- true if BungeeCord support is enabled
-
createParty
boolean createParty(@Nullable @Nullable String party, @Nullable @Nullable PartyPlayer leader)Create a party- Parameters:
party- the party nameleader- the leader of the party asPartyPlayer, null if the party should be fixed- Returns:
- true if successfully created
-
getParty
@Nullable @Nullable Party getParty(@NotNull @NotNull String party)
Get the party by its name
-
getPartyPlayer
@Nullable @Nullable PartyPlayer getPartyPlayer(@NotNull @NotNull UUID uuid)
Get the player by hisUUID- Parameters:
uuid- theUUIDof the player- Returns:
- the
PartyPlayerof the relative player
-
getPartyOfPlayer
@Nullable @Nullable Party getPartyOfPlayer(@NotNull @NotNull UUID uuid)
Get the party of the player
-
getOnlineParties
@NotNull @NotNull List<Party> getOnlineParties()
Get online parties- Returns:
- a list of
Party
-
getRanks
@NotNull @NotNull Set<PartyRank> getRanks()
Get the list of available ranks- Returns:
- a set of
PartyRank
-
getColors
@NotNull @NotNull Set<PartyColor> getColors()
Get the list of available colors- Returns:
- a set of
PartyColor
-
reloadParties
@Deprecated default void reloadParties()
Deprecated.use reloadPlugin() insteadReload Parties configuration files
-
updateParty
@Deprecated default void updateParty(Party party)
Deprecated.no longer neededSend changes to the database. Used to save parties data.- Parameters:
party- thePartyto save
-
updatePartyPlayer
@Deprecated default void updatePartyPlayer(PartyPlayer player)
Deprecated.no longer neededSend changes to the database. Used to save players data.- Parameters:
player- thePartyPlayerto save
-
broadcastPartyMessage
@Deprecated default void broadcastPartyMessage(Party party, PartyPlayer player, String message)
Deprecated.use Party.broadcastMessage(String, PartyPlayer) insteadSend a broadcast message to the party paramParty; It requires a player to send the message because Parties gets the placeholder info from the player; If it's a broadcast unrelated on players, you can insert anullplayer.- Parameters:
party- thePartythat will see the messageplayer- thePartyPlayerwho sent the messagemessage- the message to broadcast
-
addPlayerIntoParty
@Deprecated default Status addPlayerIntoParty(PartyPlayer player, Party party)
Deprecated.use Party.addMember(PartyPlayer) insteadAdd the player into the party- Parameters:
player- thePartyPlayerto insertparty- theParty- Returns:
- the result of the method as
Status
-
removePlayerFromParty
@Deprecated default Status removePlayerFromParty(PartyPlayer player)
Deprecated.use Party.removeMember(PartyPlayer) insteadRemove the player from the party- Parameters:
player- thePartyPlayerto remove- Returns:
- the result of the method as
Status
-
deleteParty
@Deprecated default Status deleteParty(Party party)
Deprecated.use Party.delete() insteadDelete the party
-
getOnlinePlayers
@Deprecated default Set<PartyPlayer> getOnlinePlayers(Party party)
Deprecated.use Party.getOnlineMembers(boolean) insteadGet a list of online players of the party- Parameters:
party- theParty- Returns:
- a list of
Set<PartyPlayer>, if the party doesn't exist returnsnull
-
refreshOnlinePlayers
@Deprecated default void refreshOnlinePlayers(Party party)
Deprecated.no longer neededRefresh the online players list of the party- Parameters:
party- theParty
-
isPlayerInParty
default boolean isPlayerInParty(UUID player)
Is the player in a party?- Parameters:
player- the player UUID to check- Returns:
- true if its in a party
-
getPartiesListByName
@NotNull @NotNull LinkedList<Party> getPartiesListByName(int numberOfParties, int offset)
Get list of parties ordered by name- Parameters:
numberOfParties- number of parties to getoffset- offset of parties list- Returns:
- a list of
Party
-
getPartiesListByOnlineMembers
@NotNull @NotNull LinkedList<Party> getPartiesListByOnlineMembers(int numberOfParties, int offset)
Get list of parties ordered by number of online members- Parameters:
numberOfParties- number of parties to getoffset- offset of parties list- Returns:
- a list of
Party
-
getPartiesListByMembers
@NotNull @NotNull LinkedList<Party> getPartiesListByMembers(int numberOfParties, int offset)
Get list of parties ordered by number of members- Parameters:
numberOfParties- number of parties to getoffset- offset of parties list- Returns:
- a list of
Party
-
getPartiesListByKills
@NotNull @NotNull LinkedList<Party> getPartiesListByKills(int numberOfParties, int offset)
Get list of parties ordered by number of kills- Parameters:
numberOfParties- number of parties to getoffset- offset of parties list- Returns:
- a list of
Party
-
getPartiesListByExperience
@NotNull @NotNull LinkedList<Party> getPartiesListByExperience(int numberOfParties, int offset)
Get list of parties ordered by number of experience- Parameters:
numberOfParties- number of parties to getoffset- offset of parties list- Returns:
- a list of
Party
-
-