Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vault Economy Max Balance Oversight #526

Open
TheosisOfficial opened this issue Apr 29, 2024 · 0 comments
Open

Vault Economy Max Balance Oversight #526

TheosisOfficial opened this issue Apr 29, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@TheosisOfficial
Copy link

Describe the bug
Most Vault economy provider plugins will have a configured maximum balance. If Vault's depositPlayer method would result in the player's balance exceeding the maximum, it should return an EconomyResponse object, whose ResponseType is ResponseType.FAILURE.

In testing, TradeSystem does not seem to check this before calling the depositPlayer method, meaning the money is not deposited into the player's account, but it is withdrawn from the other player's account, resulting in the money completely disappearing.

To Reproduce
Steps to reproduce the behavior:

  1. Install Vault, a properly-coded Vault-based economy provider, and TradeSystem
  2. Set a player's balance to near the configured maximum balance
  3. Trade the player, and give them an amount of money that would result in their balance exceeding the configured maximum
  4. Observe as the money is deleted

Expected behavior
TradeSystem should only complete trades if the EconomyResponse's ResponseType is ResponseType.SUCCESS

Discord contact: theosis

@TheosisOfficial TheosisOfficial added the bug Something isn't working label Apr 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant