AppleDash / SaneEconomy

Finally, a sane economy plugin for Bukkit.

Home Page:https://www.spigotmc.org/resources/saneeconomy-simple-but-featureful-economy.26223/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SaneLib running economy commands async (1.14.3 @ v0.13)

deploring opened this issue · comments

G'day,
I've been using your economy plugin for quite a while now and really appreciate the effort that you've put into it. Unfortunately, using the plugin on a 1.14.3 server causes the commands to break. I've done a little bit of investigation which I will explain below.

When the economy manager calls transact, the plugin will call SaneEconomyTransactionEvent. The issue is Spigot 1.14 now enforces event calls to be made synchronously. The error here is that SaneLib -> SaneCommand makes all onCommand methods run async which causes the command to throw an exception.

Other parts of the plugin are not affected, such as /eco set, as it does not call the event- as well as API usage through Vault. The solution is to run these parts of the code synchronously as required by Spigot 1.14. From what I can see, this may not be entirely possible without massive changes, as it looks like it relies on checking whether the called event was cancelled.

I've re-compiled your plugin using a modified version of SaneLib that does not call the commands async and hopefully there are no major implications in doing so. Nonetheless, I will leave this issue here so you are aware and can fix it in the future!

Cheers.

Yeah, the command /balance and like you said /eco work, however /pay doesn't work and generates a similar error as seen here: https://i.imgur.com/K0YlUPt.png (Running 1.14.4)

Should be fixed in latest, I hope.

Fixed indeed.