1
0
mirror of https://github.com/essentials/Essentials.git synced 2025-07-31 20:00:47 +02:00

Fixing home list.

This commit is contained in:
KHobbits
2012-02-21 22:12:37 +00:00
parent 377bdb7c22
commit 1a2f844bfa

View File

@@ -2,6 +2,7 @@ package com.earth2me.essentials;
import java.io.File; import java.io.File;
import java.util.*; import java.util.*;
import java.util.logging.Level;
import java.util.logging.Logger; import java.util.logging.Logger;
import org.bukkit.Location; import org.bukkit.Location;
import org.bukkit.Material; import org.bukkit.Material;
@@ -94,17 +95,7 @@ public abstract class UserData extends PlayerExtension implements IConf
private Map<String, Object> _getHomes() private Map<String, Object> _getHomes()
{ {
Object o = config.getProperty("homes"); return config.getConfigurationSection("homes").getValues(false);
if (o instanceof Map)
{
return (Map<String, Object>)o;
}
else
{
return new HashMap<String, Object>();
}
} }
public Location getHome(String name) throws Exception public Location getHome(String name) throws Exception
@@ -154,6 +145,7 @@ public abstract class UserData extends PlayerExtension implements IConf
public List<String> getHomes() public List<String> getHomes()
{ {
ess.getLogger().log(Level.INFO, "player " + this.getName() + " homecount: " + homes.size());
return new ArrayList(homes.keySet()); return new ArrayList(homes.keySet());
} }