From 6ab57b9abefd0e0f9676127fda741da1507b2629 Mon Sep 17 00:00:00 2001 From: KHobbits Date: Sun, 26 Feb 2012 05:06:03 +0000 Subject: [PATCH] Cleanup. --- .../src/com/earth2me/essentials/Settings.java | 14 ++++++-------- Essentials/src/com/earth2me/essentials/User.java | 2 -- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/Essentials/src/com/earth2me/essentials/Settings.java b/Essentials/src/com/earth2me/essentials/Settings.java index 39179b957..b6b1f4994 100644 --- a/Essentials/src/com/earth2me/essentials/Settings.java +++ b/Essentials/src/com/earth2me/essentials/Settings.java @@ -5,9 +5,7 @@ import com.earth2me.essentials.commands.IEssentialsCommand; import com.earth2me.essentials.signs.EssentialsSign; import com.earth2me.essentials.signs.Signs; import com.earth2me.essentials.textreader.IText; -import com.earth2me.essentials.textreader.KeywordReplacer; import com.earth2me.essentials.textreader.SimpleTextInput; -import com.earth2me.essentials.textreader.SimpleTextPager; import java.io.File; import java.text.MessageFormat; import java.util.*; @@ -218,10 +216,10 @@ public class Settings implements ISettings if (config.isConfigurationSection("kits")) { final ConfigurationSection kits = getKits(); - if (kits.isConfigurationSection(name)) + if (kits.isConfigurationSection(name)) { return kits.getConfigurationSection(name).getValues(true); - } + } } return null; } @@ -539,15 +537,15 @@ public class Settings implements ISettings } return max; } - private final static double MINMONEY = -10000000000000.0; - + @Override public double getMinMoney() { double min = config.getDouble("min-money", MINMONEY); - if (min > 0) { - min = -min; + if (min > 0) + { + min = -min; } if (min < MINMONEY) { diff --git a/Essentials/src/com/earth2me/essentials/User.java b/Essentials/src/com/earth2me/essentials/User.java index bd712bf87..86a3bcbfe 100644 --- a/Essentials/src/com/earth2me/essentials/User.java +++ b/Essentials/src/com/earth2me/essentials/User.java @@ -7,7 +7,6 @@ import java.util.Calendar; import java.util.GregorianCalendar; import java.util.logging.Level; import java.util.logging.Logger; -import org.bukkit.ChatColor; import org.bukkit.Location; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; @@ -160,7 +159,6 @@ public class User extends UserData implements Comparable, IReplyTo, IUser public boolean canAfford(final double cost, final boolean permcheck) { final double mon = getMoney(); - ess.getLogger().log(Level.INFO, "min cash is " + ess.getSettings().getMinMoney()); if (!permcheck || isAuthorized("essentials.eco.loan")) { return (mon - cost) > ess.getSettings().getMinMoney();