mirror of
https://github.com/EssentialsX/Essentials.git
synced 2025-01-08 17:38:20 +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;
|
return search;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Location getHome(final String name) throws Exception {
|
public Location getHome(final String name) {
|
||||||
final String search = getHomeName(name);
|
final String search = getHomeName(name);
|
||||||
final LazyLocation loc = holder.homes().get(search);
|
final LazyLocation loc = holder.homes().get(search);
|
||||||
return loc != null ? loc.location() : null;
|
return loc != null ? loc.location() : null;
|
||||||
|
@ -81,7 +81,7 @@ public class Commandhome extends EssentialsCommand {
|
|||||||
} else {
|
} else {
|
||||||
showError(user.getBase(), new Exception(tl("noHomeSetPlayer")), commandLabel);
|
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);
|
showError(user.getBase(), new Exception(tl("noHomeSetPlayer")), commandLabel);
|
||||||
} else if (homes.size() == 1 && finalPlayer.equals(user)) {
|
} else if (homes.size() == 1 && finalPlayer.equals(user)) {
|
||||||
try {
|
try {
|
||||||
|
Loading…
Reference in New Issue
Block a user