πŸ”ŒAPI Access

LightCoins comes with a comprehensive API that you can access.

We have three data objects: AccountData, CoinsData, and VirtualData. Both CoinsData and VirtualData are stored within the AccountData object, with VirtualData being stored as a List<VirtualData>.

Use LightCoins as a maven dependency

<repository>
    <id>jitpack.io</id>
    <url>https://jitpack.io</url>
</repository>

<dependency>
    <groupId>com.github.lightPlugins</groupId>
    <artifactId>lightCcins</artifactId>
    <!-- Make sure you are using the latest version! -->
    <version>CurrentVersion</version>
    <scope>provided</scope>
</dependency>

Use LightCoins as a gradle dependency

repositories {
	mavenCentral()
	maven { url 'https://jitpack.io' }
}

dependencies {
        implementation 'com.github.lightPlugins:lightCoins:Tag'
}

Some examples of how to use the API

First, let's understand how LightCoins works and how it is structured.

Lets do some transaction with the default Currency (Vault). In this case we add some amount of coins to a specified player.

Let's interact with a custom currency. In this case, we are looking for "gems" and want to remove some of them. Here is an example of how it works

LightCoins comes also with Events. There are 2 Events currently. These events are only for the default currency (vault).

Custom Events

  • LightCoinsDepositEvent

  • LightCoinsWithdrawEvent

Last updated