summaryrefslogtreecommitdiffstats
path: root/Essentials/src/com/earth2me/essentials/settings/Economy.java
diff options
context:
space:
mode:
Diffstat (limited to 'Essentials/src/com/earth2me/essentials/settings/Economy.java')
-rw-r--r--Essentials/src/com/earth2me/essentials/settings/Economy.java11
1 files changed, 11 insertions, 0 deletions
diff --git a/Essentials/src/com/earth2me/essentials/settings/Economy.java b/Essentials/src/com/earth2me/essentials/settings/Economy.java
index 5872dada9..21b6f3b05 100644
--- a/Essentials/src/com/earth2me/essentials/settings/Economy.java
+++ b/Essentials/src/com/earth2me/essentials/settings/Economy.java
@@ -40,4 +40,15 @@ public class Economy implements StorageObject
@Comment("Enable this to log all interactions with trade/buy/sell signs and sell command")
private boolean logEnabled = false;
private Worth worth = new Worth();
+ private boolean tradeInStacks = false;
+
+ public double getCommandCost(String command)
+ {
+ if (commandCosts == null)
+ {
+ return 0;
+ }
+ Double price = commandCosts.get(command);
+ return price == null || Double.isNaN(price) || Double.isInfinite(price) ? 0 : price;
+ }
}