API

Here you can find possible interfaces from the CoinsAPI to be able to use them in your plugin.

To integrate the CoinsAPI into your project, you can place the .jar file in the recources folder of your project and make this entry in the pom.xml under the dependencies:

pom.xml
<dependency>
    <groupId>de.herrtechniker</groupId>
    <artifactId>CoinsAPI</artifactId>
    <version>1.0.0-SNAPSHOT</version>
    <scope>system</scope>
    <systemPath>${project.basedir}/src/main/resources/CoinsAPI-1.0.0-SNAPSHOT-OBF.jar</systemPath>
</dependency>

CoinsAPI

To see if the player is already entered in the database, you can check it with the following query.

CoinsAPI().getAPI().isPlayerCoinsEntryExists(UUID uuid); //return boolean

Get the balance of a player.

CoinsAPI().getAPI().getCoins(UUID uuid); //return double

Set the account balance to a certain amount.

CoinsAPI().getAPI().setCoins(UUID uuid, double amount);

Remove a certain amount from a player's account.

CoinsAPI().getAPI().removeCoins(UUID uuid, double amount);

Add a certain amount to a player's account.

Reset a player's account balance.

Set a player's account balance to a certain amount.

Change a player's account balance to a certain amount.

Namefetcher

The name fetcher is a "module" that stores the name and the corresponding UUID of the player.

To check whether a player's entry already exists, do the following.

To check whether a player's entry already exists, do the following.

To make an entry in the Namefetcher for a player, do the following.

To change a player's entry, for example if the player has changed their name, do the following.

To get the name of a player based on the UUID, do the following.

To get the UUID of a player by name, do the following.

Last updated