summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Essentials/src/com/earth2me/essentials/EssentialsConf.java3
-rw-r--r--Essentials/src/com/earth2me/essentials/UserData.java3
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandhome.java6
3 files changed, 10 insertions, 2 deletions
diff --git a/Essentials/src/com/earth2me/essentials/EssentialsConf.java b/Essentials/src/com/earth2me/essentials/EssentialsConf.java
index 0dcf53218..4faecf4a5 100644
--- a/Essentials/src/com/earth2me/essentials/EssentialsConf.java
+++ b/Essentials/src/com/earth2me/essentials/EssentialsConf.java
@@ -405,7 +405,8 @@ public class EssentialsConf extends YamlConfiguration
public Location getLocation(final String path, final Server server) throws InvalidWorldException
{
- final String worldName = getString((path == null ? "" : path + ".") + "world");
+ final String worldString = (path == null ? "" : path + ".") + "world";
+ final String worldName = getString(worldString);
if (worldName == null || worldName.isEmpty())
{
return null;
diff --git a/Essentials/src/com/earth2me/essentials/UserData.java b/Essentials/src/com/earth2me/essentials/UserData.java
index 11cc6fc22..73f2771eb 100644
--- a/Essentials/src/com/earth2me/essentials/UserData.java
+++ b/Essentials/src/com/earth2me/essentials/UserData.java
@@ -142,6 +142,9 @@ public abstract class UserData extends PlayerExtension implements IConf
catch (NumberFormatException e)
{
}
+ catch (IndexOutOfBoundsException e)
+ {
+ }
}
return search;
}
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandhome.java b/Essentials/src/com/earth2me/essentials/commands/Commandhome.java
index 3d9200cbd..a030cb4cf 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandhome.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandhome.java
@@ -109,7 +109,11 @@ public class Commandhome extends EssentialsCommand
}
private void goHome(final User user, final User player, final String home, final Trade charge) throws Exception
- {
+ {
+ if (home.length() < 1)
+ {
+ throw new NotEnoughArgumentsException();
+ }
final Location loc = player.getHome(home);
if (loc == null)
{