Skip to content
Dominik edited this page Apr 24, 2023 · 1 revision

Party API

The Party API is an API for the Multi-Proxy BungeeCord and Velocity PartySystem Plugin that provides methods to manage parties.

PartyAPI

The PartyAPI class is the main class for interacting with the Party API.

Methods

  • public static PartyProvider get(): Gets the instance of the PartyProvider for interacting with the Party API. Throws an IllegalStateException if the Party API is not initialized.

PartyProvider

The PartyProvider interface provides methods to manage parties.

Methods

  • 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 empty Optional 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 empty Optional 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.

Clone this wiki locally