You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
Install Vault, a properly-coded Vault-based economy provider, and TradeSystem
Set a player's balance to near the configured maximum balance
Trade the player, and give them an amount of money that would result in their balance exceeding the configured maximum
Observe as the money is deleted
Expected behavior
TradeSystem should only complete trades if the EconomyResponse's ResponseType is ResponseType.SUCCESS
Discord contact: theosis
The text was updated successfully, but these errors were encountered:
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 anEconomyResponse
object, whoseResponseType
isResponseType.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:
Expected behavior
TradeSystem should only complete trades if the
EconomyResponse
'sResponseType
isResponseType.SUCCESS
Discord contact: theosis
The text was updated successfully, but these errors were encountered: