EssentialsX

EssentialsX

2M Downloads

UserBalanceUpdateEvent executes MULTIPLE times

MrDienns opened this issue ยท 3 comments

commented

Hi,

I'm trying to make a coin booster plugin using vault and essentials. Everything is going fine, however, when I try to use the UserBalanceUpdateEvent event that comes with the EssentialsX API, the event is executes about 20 to 40 times in my code. I've set up a counter and displayed it in the chat, and it ended up spamming to about 40.

This only occurs when I try to add balance to the player, in the event, or in a different method. When the money is not added to a player, it only executes once, so I have a feeling it has to do something with awaiting a successresponse.

Hope someone can clear things up for me!

Regards
(Version info and summery below)

Summery:
UserBalanceUpdateEvent executes roughly 20 to 40 times when trying to add balance to a player.

EssentialsX-2.0.1 version Essentials Reloaded 2.0.1-b354

commented

Can't reproduce, it only get the event once.

commented

@Kakifrucht Have you tried adding balance to the event player in the event? This only occurs when you do so
This SURELY happens on my server (Spigot 1.9.2)

commented

dba9dab adds setNewBalance(BigDecimal) in UserBalanceUpdateEvent.