Other plugins tend to lose money when accounts exceed capacity
bezeek opened this issue ยท 4 comments
Some plugins, (Factions and RealShop2 in my experience,) do not take appropriate action when an account reaches its capacity, and any excess money is lost forever.
I propose an option "account.canoverflow," to store excess money in the DB, and split the account into "available" and "unavailable" balances.
- Given the permission "gringotts.accountoverflow," money that exceeds an account's capacity will be stored in the "overflow" column of the DB.
- When the account holder has free vault space again, as much overflow as possible will be deducted from the DB and added to the player's vault. Free inventory space will be ignored, to avoid irritating the player.
- Money considered overflow may not be spent or transferred until it is moved to a vault.
- When a player has a positive unavailable balance, they will be prompted to create more vaults at appropriate times - e.g. when using /balance
- Optionally, storage of overflow in the DB may be subject to a tax, either per transfer or per day.
I hope you find this viable! I'm not much of a Java guy ๐
Thanks, this sounds like a reasonable workaround to plugins ignoring failed transfer messages. I like the tax idea.
As an addendum, if a vault is destroyed, is it possible for some/all of the overflow to drop as items? would prevent people using overflow as unraidable money for factions etc.
Awesome job on the fix! RealShop2 now (silently, as it tends to do) denies sale to a shop if your vaults are full. I can't speak for Factions though - it seems to have broken sometime after 1.4.0.
Edit: It was bouncing transactions because I wiped out the shop owner's account. facepalm
There is no global fix for this yet :)
Perhaps RealShop2 has implemented a fix. I did also submit a fix to Factions, but it's probably not in the release version yet. The latest source version should have it: https://github.com/MassiveCraft/Factions