Artillex-Studios Documentation Help

Developer API

Add the following to your repositories section:

maven { url 'https://repo.artillex-studios.com/releases/' }

Add the dependency to your dependencies section:

compileOnly("com.artillexstudios:AxParties:CHANGE-THIS")

Add the following to your repositories section:

<repository> <id>Artillex-Studios</id> <url>https://repo.artillex-studios.com/releases/</url> </repository>

Add the following to your dependencies section:

<dependency> <groupId>com.artillexstudios</groupId> <artifactId>AxParties</artifactId> <version>CHANGE-THIS</version> <scope>provided</scope> </dependency>

Replace CHANGE-THIS to the latest version: Ax parties color 40c14a amp name ax parties

API Usage

Don't forget to add AxParties to your plugin's plugin.yml, like this:

depend: - AxParties

or:

softdepend: - AxParties

Using the API:

The current API is very simple, you can access all the useful methods in the com.artillexstudios.axparties.api.AxPartiesAPI class.

AxPartiesAPI#getParties -

Method

Returns

Explanation

getParties

Map<String, Party>

Returns an unmodifiable map of all parties (key = party name, value = party object)

getPartyOf(player)

Optional<\Party>

Returns an optional party, it will be empty if the player doesn't have a party

getPartyByName(name)

Optional<\Party>

Returns an optional party, it will be empty if the party is not found

Simple example:

String partyName = "test"; Optional<Party> partyOptional = AxPartiesAPI.getPartyByName(partyName); if (partyOptional.isEmpty()) { System.out.println("Not found"); } else { Party party = partyOptional.get(); System.out.println(party.getName()); // party.getMembers() - get all members (as OfflinePlayer) // party.getOnlineMembers() - get online members (as Player) // party.getOfflineMembers() - get offline members (as OfflinePlayer) }

And that's all, if you need anything else, feel free to contact us or make a pull request on github!

Last modified: 11 January 2025