Skip to content
Mantice edited this page Dec 21, 2023 · 2 revisions

There are currently four custom events:
MobCoinDropEvent, MobCoinShopOpenEvent, MobCoinWithdrawEvent, and MobCoinRedeemEvent.

MobCoinDropEvent

public class MobCoinDropListener implements Listener {

    @EventHandler
    public void onMobCoinDrop(MobCoinDropEvent event) {

    }

}

The MobCoinDropListener is called whenever a player kills a mob that is in mobs.yml!
You may modify the amount the mob dropped!
event.setAmount(), event.addAmount(), event.removeAmount(), or event.multiplyAmount().
You may also cancel the event!

MobCoinShopOpenEvent

public class MobCoinShopOpenListener implements Listener {

    @EventHandler
    public void onMobCoinShopOpen(MobCoinShopOpenEvent event) {

    }

}

The MobCoinShopOpenEvent is called whenever the shop is opened for a player.
You may cancel this event to change what happens when the player opens the shop or it is opened for them!
In case you decide to use a different plugin for the shop.

MobCoinWithdrawEvent

This event is called when a player withdraws mob coins!

public class MobCoinWithdrawListener implements Listener {

    @EventHandler
    public void onMobCoinWithdraw(MobCoinWithdrawEvent event) {

    }

}

In this event, you can get the player and the amount withdrawn. You may also cancel the event.

MobCoinRedeemEvent

This event is called when a player redeems an admin voucher or withdrawn item!

public class MobCoinRedeemListener implements Listener {

    @EventHandler
    public void onMobCoinRedeem(MobCoinRedeemEvent event) {

    }

}

In this event, you can get the player and the amount deposited. You may also cancel the event.

Clone this wiki locally