1
0
mirror of https://github.com/essentials/Essentials.git synced 2025-08-16 11:37:30 +02:00

Can't sell negative amount of items.

This commit is contained in:
snowleo
2013-07-19 01:01:52 +02:00
parent 3becc54063
commit 3df8b0841b

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();