Developer API

1) Add the Dependency

Don't forget to change always the version!

<repository>
  <id>MonGens-Cave</id>
  <url>https://repo.mongenscave.com/releases<repository></url>
</repository>

<dependency>
  <groupId>com.mongenscave</groupId>
  <artifactId>mc-CreditsAPI</artifactId>
  <version>[VERSION]</version>
</dependency>

2) Add mc-Credits to plugin.yml

depend:
  - mc-Credits

3) Example how to use the CreditsAPI

As an example, add Credit to a player.

public class CreditExemple {
   public void giveCredit(Player player, int amount){
       CreditUtil.addCredits(player, amount);
   }
}
Event
Description

CreditChangeEvent

Triggered when a player's credit balance is modified.

PlayerBoughtEvent

Triggered when a player buys anything in the credit shop.

Last updated