mirror of
https://github.com/filoghost/ChestCommands.git
synced 2024-11-23 02:25:26 +01:00
Making some messages configurable.
This commit is contained in:
parent
f41e79e1d9
commit
f041187821
@ -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);
|
||||
|
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user