From c822be4a53400b62f21ed721a5083dafec344b53 Mon Sep 17 00:00:00 2001 From: GJ Date: Tue, 12 Feb 2013 08:39:45 -0500 Subject: [PATCH] Add other usage string. --- .../nossr50/party/commands/PartyLockCommand.java | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/gmail/nossr50/party/commands/PartyLockCommand.java b/src/main/java/com/gmail/nossr50/party/commands/PartyLockCommand.java index d6b68e269..d20fba6a8 100644 --- a/src/main/java/com/gmail/nossr50/party/commands/PartyLockCommand.java +++ b/src/main/java/com/gmail/nossr50/party/commands/PartyLockCommand.java @@ -30,7 +30,7 @@ public class PartyLockCommand implements CommandExecutor { case 2: if (!args[0].equalsIgnoreCase("lock")) { - sender.sendMessage(LocaleLoader.getString("Commands.Usage.2", "party", "lock", "[on|off]")); + sendUsageStrings(sender); return true; } @@ -41,13 +41,13 @@ public class PartyLockCommand implements CommandExecutor { unlockParty(sender, command); } else { - sender.sendMessage(LocaleLoader.getString("Commands.Usage.2", "party", "lock", "[on|off]")); + sendUsageStrings(sender); } return true; default: - sender.sendMessage(LocaleLoader.getString("Commands.Usage.2", "party", "lock", "[on|off]")); + sendUsageStrings(sender); return true; } } @@ -89,4 +89,9 @@ public class PartyLockCommand implements CommandExecutor { playerParty.setLocked(false); sender.sendMessage(LocaleLoader.getString("Party.Unlocked")); } + + private void sendUsageStrings(CommandSender sender) { + sender.sendMessage(LocaleLoader.getString("Commands.Usage.2", "party", "lock", "[on|off]")); + sender.sendMessage(LocaleLoader.getString("Commands.Usage.1", "party", "unlock")); + } }