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:
@@ -82,12 +82,12 @@ 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();
|
||||||
|
Reference in New Issue
Block a user