This commit is contained in:
KHobbits 2012-02-26 05:06:03 +00:00
parent 862f3aad59
commit 6ab57b9abe
2 changed files with 6 additions and 10 deletions

View file

@ -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)
{

View file

@ -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<User>, 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();