EssentialsX

EssentialsX

2M Downloads

Suggestion: Prevent Decimals In Payments

ShadowRanger opened this issue ยท 4 comments

commented

Just had a suggestion which would greatly benefit me and my server, and I'm sure others as well. Some servers have a currency which is supposed to be based on whole numbers, and not contain any decimal placed amounts. I just thought it might be worth adding a configurable option to disallow decimal payments (e.g: /pay player 20.5).

commented
commented

That commit doesn't prevent decimal amounts being used in the pay command though, which means technically bank balanced can still contain amounts with decimals and just display as whole numbers?

commented

Ah then I don't see a reason to add it so you can only sent whole numbers. Seem silly to me.

commented

Well its just that like I said, some server's economies are meant to be whole numbers. Like for example lets say a server's currency is 'Gold Bars' and there isn't supposed to be any fractional amounts or decimals for this currency. If that was the case, I would rather not have player balances saved as decimals even if they are displayed as whole numbers. But I guess its a bit unnecessary, however I'm sure there are some people who wouldn't mind an option for it.