From 6d46fc66ce1f762de998824a13a38811c8364f0c Mon Sep 17 00:00:00 2001 From: KHobbits Date: Tue, 21 Feb 2012 22:12:37 +0000 Subject: Fixing home list. --- Essentials/src/com/earth2me/essentials/UserData.java | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/Essentials/src/com/earth2me/essentials/UserData.java b/Essentials/src/com/earth2me/essentials/UserData.java index 44ac096b9..643c45868 100644 --- a/Essentials/src/com/earth2me/essentials/UserData.java +++ b/Essentials/src/com/earth2me/essentials/UserData.java @@ -2,6 +2,7 @@ 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; @@ -94,17 +95,7 @@ public abstract class UserData extends PlayerExtension implements IConf private Map _getHomes() { - Object o = config.getProperty("homes"); - - if (o instanceof Map) - { - return (Map)o; - } - else - { - return new HashMap(); - } - + return config.getConfigurationSection("homes").getValues(false); } public Location getHome(String name) throws Exception @@ -154,6 +145,7 @@ public abstract class UserData extends PlayerExtension implements IConf public List getHomes() { + ess.getLogger().log(Level.INFO, "player " + this.getName() + " homecount: " + homes.size()); return new ArrayList(homes.keySet()); } -- cgit v1.2.3