Discord

API Methods

In this page you can see an usage example of PartiesAPI class methods.

You can find the full JavaDoc here

Usage

You can use classes Party and PartyPlayer to edit the data, see below:

PartiesAPI api = Parties.getApi(); // Get Parties API
Party party = api.getParty("MyParty"); // Get the party 'MyParty'
party.setDescription("just a new description"); // Change the description

Another example:

UUID playerUUID; // Get a player uuid
PartiesAPI api = Parties.getApi(); // Get Parties API
PartyPlayer player = api.getPartyPlayer(playerUUID); // Get the player that have as UUID 'playerUUID'
player.setRank(1); // Set the player rank to 1

Parties are identified by an UUID, if you wanna store somewhere a party, you must use that:

PartiesAPI api = Parties.getApi(); // Get Parties API
Party party = api.getParty("MyParty"); // Get the party 'MyParty'
UUID id = party.getId(); // Get the id
// You can get a party by its ID
api.getParty(id);

You can find the full list of methods in the JavaDoc here.

Deprecations

If you are using a code that is deprecated, you really should update it.
Parties deprecated methods will be removed with future updates.