mirror of
https://github.com/EssentialsX/Essentials.git
synced 2024-09-27 15:22:37 +02:00
Fix some /home errors with invalid data.
This commit is contained in:
parent
2ee590d85c
commit
8fecd44786
@ -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;
|
||||
|
@ -142,6 +142,9 @@ public abstract class UserData extends PlayerExtension implements IConf
|
||||
catch (NumberFormatException e)
|
||||
{
|
||||
}
|
||||
catch (IndexOutOfBoundsException e)
|
||||
{
|
||||
}
|
||||
}
|
||||
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
|
||||
{
|
||||
{
|
||||
if (home.length() < 1)
|
||||
{
|
||||
throw new NotEnoughArgumentsException();
|
||||
}
|
||||
final Location loc = player.getHome(home);
|
||||
if (loc == null)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user