summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKHobbits <rob@khobbits.co.uk>2012-02-21 22:14:11 +0000
committerKHobbits <rob@khobbits.co.uk>2012-02-21 22:19:56 +0000
commit46f05ee92f1deabe18dde1f527494fb717a079bd (patch)
tree77c9155b4041351c2dd3cc150ce93a7028fc2dd6
parent6d46fc66ce1f762de998824a13a38811c8364f0c (diff)
downloadEssentials-46f05ee92f1deabe18dde1f527494fb717a079bd.tar
Essentials-46f05ee92f1deabe18dde1f527494fb717a079bd.tar.gz
Essentials-46f05ee92f1deabe18dde1f527494fb717a079bd.tar.lz
Essentials-46f05ee92f1deabe18dde1f527494fb717a079bd.tar.xz
Essentials-46f05ee92f1deabe18dde1f527494fb717a079bd.zip
Check to see if home section exists.
-rw-r--r--Essentials/src/com/earth2me/essentials/UserData.java7
1 files changed, 4 insertions, 3 deletions
diff --git a/Essentials/src/com/earth2me/essentials/UserData.java b/Essentials/src/com/earth2me/essentials/UserData.java
index 643c45868..e540bd998 100644
--- a/Essentials/src/com/earth2me/essentials/UserData.java
+++ b/Essentials/src/com/earth2me/essentials/UserData.java
@@ -2,7 +2,6 @@ package com.earth2me.essentials;
import java.io.File;
import java.util.*;
-import java.util.logging.Level;
import java.util.logging.Logger;
import org.bukkit.Location;
import org.bukkit.Material;
@@ -95,7 +94,10 @@ public abstract class UserData extends PlayerExtension implements IConf
private Map<String, Object> _getHomes()
{
- return config.getConfigurationSection("homes").getValues(false);
+ if (config.isConfigurationSection("homes")) {
+ return config.getConfigurationSection("homes").getValues(false);
+ }
+ return new HashMap<String, Object>();
}
public Location getHome(String name) throws Exception
@@ -145,7 +147,6 @@ public abstract class UserData extends PlayerExtension implements IConf
public List<String> getHomes()
{
- ess.getLogger().log(Level.INFO, "player " + this.getName() + " homecount: " + homes.size());
return new ArrayList(homes.keySet());
}