Essentials MaxMoneyException is not implemented
mastercake10 opened this issue ยท 2 comments
Apparently, EssentialsX offers a config option that lets you define a max-money
amount. Essentials itself includes a MaxMoneyException
, which is used when depositing money via the /pay command, while the Vault implementation doesn't handle this Exception at all.
This leads to money loss, since calling the Economy#depositePlayer
method always returns SUCCESS, even when reaching the money limit.
I just tried to fix it on my own, but I figured out that there are two, inconsistent implementations. The Economy API of Essentials - which Vault is using - doesn't implement the MaxMoneyException yet, however, the Essentials User class does.
I am uncertain if this issue should be solved by using this User class, or by updating the Economy API on Essential's end. The first option wouldn't break backward compatibility that much.
This is another one of those reasons why I suggest economies implement their own adapter. the current essentials adapter is a legacy product and no longer maintained. if it works, then great. if it doesn't then essentials needs to provide a better working alternative. I wont be performing core feature updates that interfaces with Essentials newer User-level API, that can be done and maintained by essentials.