-
Notifications
You must be signed in to change notification settings - Fork 3
API
The Party API is an API for the Multi-Proxy BungeeCord and Velocity PartySystem Plugin that provides methods to manage parties.
The PartyAPI
class is the main class for interacting with the Party API.
-
public static PartyProvider get()
: Gets the instance of thePartyProvider
for interacting with the Party API. Throws anIllegalStateException
if the Party API is not initialized.
The PartyProvider
interface provides methods to manage parties.
-
OnlinePlayerProvider onlinePlayerProvider()
: Returns the provider for retrieving online players. -
Optional<UUID> getPartyFromPlayer(UUID uniqueId)
: Gets the party ID associated with a player's UUID. Returns an emptyOptional
if the player is not in a party. -
void addPlayerToParty(UUID partyId, UUID player)
: Adds a player to a party. -
void removePlayerFromParty(UUID partyId, UUID player, String username)
: Removes a player from a party. -
void changePartyLeader(UUID partyId, UUID oldLeader, UUID newLeader)
: Changes the leader of a party. -
Optional<Party> getParty(UUID id)
: Gets the party associated with a given ID. Returns an emptyOptional
if the party does not exist. -
Party createParty(UUID leader)
: Creates a new party with the given leader. -
void sendMessageToParty(Party party, String messageKey, Object... replacements)
: Sends a message to all members and leader of a party. -
void sendMessageToMembers(Party party, String messageKey, Object... replacements)
: Sends a message to all members of a party. -
void connectPartyToServer(Party party, String serverName)
: Connects a party to a server. -
void deleteParty(UUID id)
: Deletes a party with the given ID. -
void removePendingPartyRequest(String source)
: Removes a pending party request from the source player to the target player.