mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-02-12 12:23:59 +00:00
Check to see if home section exists.
This commit is contained in:
parent
6d46fc66ce
commit
46f05ee92f
1 changed files with 4 additions and 3 deletions
|
@ -2,7 +2,6 @@ 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;
|
||||||
|
@ -95,8 +94,11 @@ public abstract class UserData extends PlayerExtension implements IConf
|
||||||
|
|
||||||
private Map<String, Object> _getHomes()
|
private Map<String, Object> _getHomes()
|
||||||
{
|
{
|
||||||
|
if (config.isConfigurationSection("homes")) {
|
||||||
return config.getConfigurationSection("homes").getValues(false);
|
return config.getConfigurationSection("homes").getValues(false);
|
||||||
}
|
}
|
||||||
|
return new HashMap<String, Object>();
|
||||||
|
}
|
||||||
|
|
||||||
public Location getHome(String name) throws Exception
|
public Location getHome(String name) throws Exception
|
||||||
{
|
{
|
||||||
|
@ -145,7 +147,6 @@ 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());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue