mirror of
https://github.com/EssentialsX/Essentials.git
synced 2024-12-22 17:18:37 +01:00
Fix invalid home locations giving blank errors (#4240)
This commit is contained in:
parent
780aadedf2
commit
f08c176b68
@ -153,7 +153,7 @@ public abstract class UserData extends PlayerExtension implements IConf {
|
||||
return search;
|
||||
}
|
||||
|
||||
public Location getHome(final String name) throws Exception {
|
||||
public Location getHome(final String name) {
|
||||
final String search = getHomeName(name);
|
||||
final LazyLocation loc = holder.homes().get(search);
|
||||
return loc != null ? loc.location() : null;
|
||||
|
@ -81,7 +81,7 @@ public class Commandhome extends EssentialsCommand {
|
||||
} else {
|
||||
showError(user.getBase(), new Exception(tl("noHomeSetPlayer")), commandLabel);
|
||||
}
|
||||
} else if (homes.isEmpty()) {
|
||||
} else if (homes.isEmpty() || finalPlayer.getHome(homes.get(0)) == null) {
|
||||
showError(user.getBase(), new Exception(tl("noHomeSetPlayer")), commandLabel);
|
||||
} else if (homes.size() == 1 && finalPlayer.equals(user)) {
|
||||
try {
|
||||
|
Loading…
Reference in New Issue
Block a user