HTTPStanley/DivinityEconomy

Refactor plugin to prevent overpaying players with infinite cash

Closed this issue · 5 comments

Plugin should not let users have infinite cash!
This happens with setbal and so on.
/sell should factor in having infinite cash.

I have updated some methods to provide an error once this happens.
Refactoring the code to undo all previous operations for something rare like this... no.

How is accidentally paying infinite cash possible?

How is accidentally paying infinite cash possible?

Not actually sure, it seems to be caused by players or items having more or being worth more than what a double can store.

This may be fixed in the latest pull request from the economy update.

With the BigDecimal update. This should no longer happen. As not only can we support larger values with increased accuracy. But also any values above what's possible should be rejected and refunded (should it be an item sale, for example).