EssentialsX

EssentialsX

2M Downloads

Can't listen to UserBalanceUpdateEvent

therladbsgh opened this issue ยท 1 comments

commented

Here is the onEnable() method in my main class:

public void onEnable() {
    getServer().getPluginManager().registerEvents(new MoneyListener(), this);
}

Here is the MoneyListener class:

public class MoneyListener implements Listener {

  @EventHandler
  public void onPlayerEarnMoney(UserBalanceUpdateEvent event) {
    System.out.println("Earn money");
  }

  @EventHandler
  public void onPlayerJoin(PlayerJoinEvent event) {
    System.out.println("Player joined");
  }

}

The MoneyListener correctly responds to PlayerJoinedEvent (prints a message), but does not respond to UserBalanceUpdateEvent. This is on Spigot 1.11.2, with EssentialsX-2.0.1; I also have Vault-1.6.6 and iConomyRecreation pre-8.0 installed.

commented

UserBalanceUpdateEvent is only fired if EssentialsEco is enabled.