diff --git a/ChestCommands/src/com/gmail/filoghost/chestcommands/command/CommandHandler.java b/ChestCommands/src/com/gmail/filoghost/chestcommands/command/CommandHandler.java index 72cac4f..9b517f0 100644 --- a/ChestCommands/src/com/gmail/filoghost/chestcommands/command/CommandHandler.java +++ b/ChestCommands/src/com/gmail/filoghost/chestcommands/command/CommandHandler.java @@ -104,9 +104,13 @@ public class CommandHandler extends CommandFramework { } if (sender.getName().equalsIgnoreCase(target.getName())) { - sender.sendMessage(ChatColor.GREEN + "Opening the menu \"" + menuName + "\"."); + if (!ChestCommands.getLang().open_menu.isEmpty()) { + sender.sendMessage(ChestCommands.getLang().open_menu.replace("{menu}", menuName)); + } } else { - sender.sendMessage(ChatColor.GREEN + "Opening the menu \"" + menuName + "\" to " + target.getName() + "."); + if (!ChestCommands.getLang().open_menu_others.isEmpty()) { + sender.sendMessage(ChestCommands.getLang().open_menu_others.replace("{menu}", menuName).replace("{player}", target.getName())); + } } menu.open(target); diff --git a/ChestCommands/src/com/gmail/filoghost/chestcommands/config/Lang.java b/ChestCommands/src/com/gmail/filoghost/chestcommands/config/Lang.java index 789496e..6b4fd4c 100644 --- a/ChestCommands/src/com/gmail/filoghost/chestcommands/config/Lang.java +++ b/ChestCommands/src/com/gmail/filoghost/chestcommands/config/Lang.java @@ -11,6 +11,8 @@ public class Lang extends SpecialConfig { public String no_money = "&cYou need {money}$ for this."; public String no_points = "&cYou need {points} player points for this."; public String menu_not_found = "&cMenu not found! Please inform the staff."; + public String open_menu = "&aOpening the menu \"{menu}\"."; + public String open_menu_others = "&aOpening the menu \"{menu}\" to {player}."; public String any = "any"; // Used in no_required_item when data value is not restrictive. public Lang(PluginConfig config) {