Gringotts

Gringotts

53.6k Downloads

Gringotts-specific transaction failings difficult to find

usevalue opened this issue ยท 3 comments

commented

I had a weird bug. I was unable to buy a towny plot. According to towny, I didn't have the cash. It turned out that the transaction failed because there wasn't space in the town vault.

First: is it intended behaviour for virtual vaults to have a storage cap? If not, I've misdiagnosed the bug. But if so,
Second: It might be useful to add a debug mode to the Vault connector, since Gringotts is going to fail transactions for reasons which won't occur to most devs who want to use an Economy.

Let me know what the case is and I can have a crack at it either way.

commented

The cap on a town's theoretical chest is one less than the value of the maximum denomination.

commented

Yep, this is intentional to avoid issues with currency values smaller than the lowest denomination. But it seems to cause some confusion the way it is, so maybe I should change it ...

commented

I kind of like the behaviour. It just made figuring out the bug a pain in the ass. I think adding a debugging option for the VaultConnector would be enough. The problem is that Gringotts is making decisions quietly in the background. By the time the issue passes through vault to Towny (or whatever), some of the uniqueness has been stripped away, so the error messages really just represent the final plugin's best guess as to what's going on.