Can't sell negative amount of items.

This commit is contained in:
snowleo 2013-07-19 01:01:52 +02:00
parent 8aac502ab6
commit 4eef8b5e84

View File

@ -82,12 +82,12 @@ public class Commandsell extends EssentialsCommand
throw new Exception(_("itemCannotBeSold"));
}
BigDecimal result = worth.multiply(BigDecimal.valueOf(amount));
if (amount == 0)
if (amount <= 0)
{
return result;
return BigDecimal.ZERO;
}
BigDecimal result = worth.multiply(BigDecimal.valueOf(amount));
//TODO: Prices for Enchantments
final ItemStack ris = is.clone();