Add error_home_invalid_other message

This commit is contained in:
William committed 2021-09-01 13:36:42 +01:00
1 parent c9b7d956f5
commit bac391af43
3 files changed
+12 -3

No files matched your search

@@ -59,7 +59,11 @@ public class EditHomeCommand extends CommandBase implements TabCompleter {
try {
if (!DataManager.homeExists(ownerName, homeName, connection)) {
MessageManager.sendMessage(p, "error_home_invalid", homeName);
if (!ownerName.equalsIgnoreCase(p.getName())) {
MessageManager.sendMessage(p, "error_home_invalid_other", ownerName, homeName);
} else {
MessageManager.sendMessage(p, "error_home_invalid", homeName);
}
return;
}
Home home = DataManager.getHome(ownerName, homeName, connection);