mirror of
https://github.com/EssentialsX/Essentials.git
synced 2025-01-26 18:11:52 +01:00
Can't sell negative amount of items.
This commit is contained in:
parent
8aac502ab6
commit
4eef8b5e84
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user