mirror of
https://github.com/essentials/Essentials.git
synced 2025-08-14 10:34:41 +02:00
Fix some /home errors with invalid data.
This commit is contained in:
@@ -405,7 +405,8 @@ public class EssentialsConf extends YamlConfiguration
|
|||||||
|
|
||||||
public Location getLocation(final String path, final Server server) throws InvalidWorldException
|
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())
|
if (worldName == null || worldName.isEmpty())
|
||||||
{
|
{
|
||||||
return null;
|
return null;
|
||||||
|
@@ -142,6 +142,9 @@ public abstract class UserData extends PlayerExtension implements IConf
|
|||||||
catch (NumberFormatException e)
|
catch (NumberFormatException e)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
catch (IndexOutOfBoundsException e)
|
||||||
|
{
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return search;
|
return search;
|
||||||
}
|
}
|
||||||
|
@@ -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
|
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);
|
final Location loc = player.getHome(home);
|
||||||
if (loc == null)
|
if (loc == null)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user