Disable people paying negative values request
Elgorond opened this issue ยท 6 comments
If players with the normal essentials.pay permission do /pay player -1 for instance, it will just function as /pay player 1. This isn't a big deal, but players can trick "noobs" into thinking paying negative will give them money...
@SupaHam since you already have the setup, could you fix this very quickly by, a) adding '-' to the regex (not replacing it) here and b) checking if BigDecimal is negative here. It would also be nice if you could automatically add a replace for "," to ".", since comma is the default decimal format in many countries. I'd do it myself but it is a bigger hassle to set it up right now.
@Kakifrucht Replacing comma could introduce more issues than it would solve. By replacing comma with fullstops we would not be accommodating the greater part of the world. It would need to be discussed further.
@Kakifrucht @SupaHam Here's an idea: load the regex from the localisation file. I know that its current purpose is for custom messages, but this is something which varies greatly across the world and would benefit from being localisable.