Making some messages configurable.

This commit is contained in:
filoghost 2014-11-08 09:48:00 +01:00
parent f41e79e1d9
commit f041187821
2 changed files with 8 additions and 2 deletions

View File

@ -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);

View File

@ -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) {