Listening to events
import ovh.mythmc.banco.api.event.BancoEvent;
import ovh.mythmc.banco.api.event.BancoEventListener;
public final class DemoListener implements BancoEventListener {
@Override
public void handle(final BancoEvent Event event) {
// This code will run every time a BancoEvent is triggered
}
}import ovh.mythmc.banco.api.event.BancoEvent;
import ovh.mythmc.banco.api.event.BancoEventListener;
import ovh.mythmc.banco.api.event.impl.BancoTransactionEvent;
public final class DemoListener implements BancoEventListener {
@Override
public void handle(final BancoEvent event) {
// We want to check for BancoTransactionEvent
if(event instanceof BancoTransactionEvent transactionEvent) {
// This code will run every time a BancoTransactionEvent is triggered
System.out.println(transactionEvent);
}
}
}Last updated