Grand Economy

Grand Economy

249k Downloads

Event for when balance changes

The-Fireplace opened this issue · 3 comments

commented

@AustereTony-MCMods:

MC version: 1.12.2

Hello.

Grand Economy is a great option for implementing an economy for the server, and support for third-party platforms (like Sponge) is a great bonus.

I use Grand Economy to integrate third-party economies into my project (Oxygen). In my opinion, there is not enough opportunity to track a change in a player’s balance when this change occurs through Grand Economy (eg. chat commands). Could you add an event to track the player’s balance update and fire it when the balance changes inside the Grand Economy?

I need this to be able to synchronize the player’s balance with the client, if it was changed using the Grand Economy commands. At the moment, I have to use ASM transformers to implement hooks in your methods in order to track changes, which is not very convenient and not safe in case of Grand Economy update. Hooks with position: https://github.com/AustereTony-MCMods/Oxygen-Currency-Providers/blob/grand-economy/src/main/java/austeretony/oxygen_cp_ge/common/core/CurrencyProviderHooks.java

If you can add an event and provide the player's UUID, the old and new balance, it would be great.

Thank you.

commented

Thoughts on this?
116fdb2

commented

Fine! I updated the provider and tested it with Grand Economy 1.3.1, the balance change event fulfills its function, thank you. When new version of Grand Economy will be released?

commented

It is currently only available to Patrons, and will be posted to CurseForge on December 8.