summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandsell.java8
1 files changed, 4 insertions, 4 deletions
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandsell.java b/Essentials/src/com/earth2me/essentials/commands/Commandsell.java
index 386aac603..c4931c00a 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandsell.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandsell.java
@@ -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();