mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2024-10-05 16:24:47 +00:00
Merge branch 'master' of github.com:essentials/Essentials
This commit is contained in:
commit
bb6b2c9374
|
@ -98,9 +98,14 @@ public class SignTrade extends EssentialsSign
|
||||||
if (split.length == 2 && amountNeeded)
|
if (split.length == 2 && amountNeeded)
|
||||||
{
|
{
|
||||||
final Double money = getMoney(split[0]);
|
final Double money = getMoney(split[0]);
|
||||||
final Double amount = getDoublePositive(split[1]);
|
Double amount = getDoublePositive(split[1]);
|
||||||
if (money != null && amount != null)
|
if (money != null && amount != null)
|
||||||
{
|
{
|
||||||
|
amount -= amount % money;
|
||||||
|
if (amount < 0.01 || money < 0.01)
|
||||||
|
{
|
||||||
|
throw new SignException(Util.i18n("moreThanZero"));
|
||||||
|
}
|
||||||
sign.setLine(index, Util.formatCurrency(money, ess) + ":" + Util.formatCurrency(amount, ess).substring(1));
|
sign.setLine(index, Util.formatCurrency(money, ess) + ":" + Util.formatCurrency(amount, ess).substring(1));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue