Usage

Methods

Using FlareMobcoins API is very easy.

import net.flares.flaremobcoins.API.MobcoinsPlayer;

class ... {
    
    public void example() {
        Player player /* Bukkit player */
        MobcoinsPlayer.warpPlayer(player).giveMobcoins(12);
        MobcoinsPlayer.warpPlayer(player.getUniqueId()).removeMobcoins(2);
        MobcoinsPlayer.warpPlayer(player).getMobcoins();
    }
}

When you are trying to warp the player in a MobcoinsPlayer you can use or its name or its UUID!

Events

MobCoinReceiveEvent

This is an event that is fired when a player receve a mobcoin from a entity drop

import net.flares.flaremobcoins.API.MobCoinReceiveEvent;

// Example usage
private void onMobcoinRecive(MobCoinReceiveEvent event) {
    Entity entity = event.getEntity();
    Player player = event.getPlayer();
    player.sendMessage("You killed " + entity);
}

Last updated