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
+11 -2

No files matched your search

@@ -59,7 +59,11 @@ public class EditHomeCommand extends CommandBase implements TabCompleter {
try { try {
if (!DataManager.homeExists(ownerName, homeName, connection)) { 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; return;
} }
Home home = DataManager.getHome(ownerName, homeName, connection); Home home = DataManager.getHome(ownerName, homeName, connection);
@@ -201,7 +201,11 @@ public class SettingHandler {
MessageManager.sendMessage(player, "home_deleted_other", ownerName, homeName); MessageManager.sendMessage(player, "home_deleted_other", ownerName, homeName);
} }
} else { } else {
MessageManager.sendMessage(player, "error_home_invalid", homeName); if (!ownerName.equalsIgnoreCase(player.getName())) {
MessageManager.sendMessage(player, "error_home_invalid_other", ownerName, homeName);
} else {
MessageManager.sendMessage(player, "error_home_invalid", homeName);
}
} }
} else { } else {
if (homeName.equalsIgnoreCase("all")) { if (homeName.equalsIgnoreCase("all")) {
+1
View File
@@ -118,3 +118,4 @@ error_ignoring_teleport_requests: '[Error:](#ff3300) [You are currently ignoring
error_no_offline_position: '[Error:](#ff3300) [Could not find where %1% last logged out.](#ff7e5e)' error_no_offline_position: '[Error:](#ff3300) [Could not find where %1% last logged out.](#ff7e5e)'
error_invalid_player: '[Error:](#ff3300) [Please specify the name of a valid player!](#ff7e5e)' error_invalid_player: '[Error:](#ff3300) [Please specify the name of a valid player!](#ff7e5e)'
error_no_homes_set_other: '[Error:](#ff3300) [%1% hasn''t set any homes!](#ff7e5e)' error_no_homes_set_other: '[Error:](#ff3300) [%1% hasn''t set any homes!](#ff7e5e)'
error_home_invalid_other: '[Error:](#ff3300) [%1% doesn''t have a home set named "%2%"](#ff7e5e)'