mirror of
https://github.com/essentials/Essentials.git
synced 2025-08-17 03:54:19 +02:00
Can't sell negative amount of items.
This commit is contained in:
@@ -82,13 +82,13 @@ public class Commandsell extends EssentialsCommand
|
|||||||
throw new Exception(_("itemCannotBeSold"));
|
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
|
//TODO: Prices for Enchantments
|
||||||
final ItemStack ris = is.clone();
|
final ItemStack ris = is.clone();
|
||||||
ris.setAmount(amount);
|
ris.setAmount(amount);
|
||||||
|
Reference in New Issue
Block a user