diff options
Diffstat (limited to 'Essentials/src/net/ess3/settings/Economy.java')
-rw-r--r-- | Essentials/src/net/ess3/settings/Economy.java | 28 |
1 files changed, 13 insertions, 15 deletions
diff --git a/Essentials/src/net/ess3/settings/Economy.java b/Essentials/src/net/ess3/settings/Economy.java index 54315bca8..bd37372bd 100644 --- a/Essentials/src/net/ess3/settings/Economy.java +++ b/Essentials/src/net/ess3/settings/Economy.java @@ -1,11 +1,7 @@ package net.ess3.settings; import java.util.Map; -import lombok.AccessLevel; -import lombok.Data; -import lombok.EqualsAndHashCode; -import lombok.Getter; -import lombok.Setter; +import lombok.*; import net.ess3.economy.Worth; import net.ess3.storage.Comment; import net.ess3.storage.MapValueType; @@ -30,30 +26,32 @@ public class Economy implements StorageObject { return currencySymbol == null || currencySymbol.isEmpty() ? "$" : currencySymbol.substring(0, 1); } + private final transient static double MAXMONEY = 10000000000000.0; @Comment( - { - "Set the maximum amount of money a player can have", - "The amount is always limited to 10 trillions because of the limitations of a java double" - }) + { + "Set the maximum amount of money a player can have", + "The amount is always limited to 10 trillions because of the limitations of a java double" + }) private double maxMoney = MAXMONEY; public double getMaxMoney() { return Math.abs(maxMoney) > MAXMONEY ? MAXMONEY : Math.abs(maxMoney); } - + @Comment( - { - "Set the minimum amount of money a player can have (must be above the negative of max-money).", - "Setting this to 0, will disable overdrafts/loans completely. Users need 'essentials.eco.loan' perm to go below 0." - }) + { + "Set the minimum amount of money a player can have (must be above the negative of max-money).", + "Setting this to 0, will disable overdrafts/loans completely. Users need 'essentials.eco.loan' perm to go below 0." + }) private double minMoney = -MAXMONEY; + public double getMinMoney() { return Math.abs(minMoney) > MAXMONEY ? -MAXMONEY : minMoney; } - + @Comment("Enable this to log all interactions with trade/buy/sell signs and sell command") private boolean logEnabled = false; private Worth worth = new Worth(); |