mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-08-02 02:33:08 +00:00
Fix some /home errors with invalid data.
This commit is contained in:
parent
2ee590d85c
commit
8fecd44786
3 changed files with 10 additions and 2 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue