Vault

Vault

7M Downloads

Possible implementation/addition of support of BigDecimals

luwie556 opened this issue ยท 5 comments

commented

Hey i was wondering if you would implement bigdecimals which would make it so people can have > 10 Trillion which people have done before but I'm thinking with a custom fork of Vault. But if you're asking why the large inflation, which the answer would be OP servers, such as OP Prison (Big inflation leader)

commented

This has been discussed in length in the past and will not be added.

commented

Is there a way I can make sure that if someone gets this much money there will not be any glitches/errors? That could be very confusing and create a big mess.

commented

@Lightning11wins that's not a question for Vault. check with your economy plugin on the limitations.

commented

So if someone gets that much money with vault, what will happen when they get, say another 25$?

commented

@Lightning11wins - Money isn't 'gotten with vault' - Vault just defines the API. If your economy backend uses BigDecimal and another plugin performs a give player X $25 then it'll work just fine, as the number '25' is well within precision handling for a double. The point of using bigdecimal inside of Vault only becomes a potential issue when plugins want to transfer large amounts of $ at once between accounts. Since the methods by which Vault defines it's layer uses doubles there may be some precision loss for very large numbers or numbers with significant decimals of precision. But again, this is an edge case, and the way that most servers interact with player accounts ends up making this a non-issue, which is why I haven't overhauled the API to force BigDecimal usage.