From 6f001fc59721cc3bef417055c4dc23680f158749 Mon Sep 17 00:00:00 2001 From: Lilac Date: Sun, 29 Sep 2019 18:29:02 +0100 Subject: [PATCH] Added lang lines, fixed items resetting --- .../java/com/songoda/ultimatekits/gui/GUIKitSelector.java | 5 +++-- src/main/java/com/songoda/ultimatekits/kit/KitItem.java | 2 +- src/main/resources/en_US.lang | 2 ++ 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/songoda/ultimatekits/gui/GUIKitSelector.java b/src/main/java/com/songoda/ultimatekits/gui/GUIKitSelector.java index 069ba50..b4379a2 100644 --- a/src/main/java/com/songoda/ultimatekits/gui/GUIKitSelector.java +++ b/src/main/java/com/songoda/ultimatekits/gui/GUIKitSelector.java @@ -159,7 +159,8 @@ public class GUIKitSelector extends AbstractGUI { meta.setDisplayName(Methods.convertToInvisibleString(kitItem + ":") + Methods.formatText(title)); ArrayList lore = new ArrayList<>(); if (kit.getPrice() != 0) - lore.add(Methods.formatText("&7This kit costs &a$" + kit.getPrice() + "&7.")); + lore.add(plugin.getLocale().getMessage("interface.selector.cost") + .processPlaceholder("cost", kit.getPrice()).getMessage()); else if (kit.getLink() != null) lore.add(plugin.getLocale().getMessage("general.type.link").getMessage()); @@ -195,7 +196,7 @@ public class GUIKitSelector extends AbstractGUI { if (player.hasPermission("ultimatekits.admin")) { lore.add(""); - lore.add(Methods.formatText("&6Middle Click &7to edit positioning.")); + lore.add(plugin.getLocale().getMessage("interface.selector.middleclick").getMessage()); } } else { lore.add(Methods.formatText("&6&lEdit Mode")); diff --git a/src/main/java/com/songoda/ultimatekits/kit/KitItem.java b/src/main/java/com/songoda/ultimatekits/kit/KitItem.java index 1b8966b..36bd8c2 100644 --- a/src/main/java/com/songoda/ultimatekits/kit/KitItem.java +++ b/src/main/java/com/songoda/ultimatekits/kit/KitItem.java @@ -161,7 +161,7 @@ public class KitItem { WordUtils.capitalize(item.getType().toString().toLowerCase().replace("_", " ")); if (capitalizedName.contains(Methods.convertToInvisibleString(";faqe"))) capitalizedName = meta.getDisplayName().split(Methods.convertToInvisibleString(";faqe"))[1]; - meta.setDisplayName(Methods.convertToInvisibleString(compileOptions() + ";faqe") + ChatColor.RESET + capitalizedName); + meta.setDisplayName(Methods.convertToInvisibleString(compileOptions() + ";faqe") + capitalizedName); } item.setItemMeta(meta); return item; diff --git a/src/main/resources/en_US.lang b/src/main/resources/en_US.lang index df657f1..4699509 100644 --- a/src/main/resources/en_US.lang +++ b/src/main/resources/en_US.lang @@ -16,6 +16,8 @@ interface.selector.aboutkit = "&7Can't open a kit?|&7Rank up to gain access!" interface.selector.leftpreview = "&6&lLEFT CLICK &7to preview kit." interface.selector.rightclaim = "&6&lRIGHT CLICK &7to claim kit." interface.selector.rightbuy = "&6&lRIGHT CLICK &7to buy kit." +interface.selector.cost = "&7This kit costs &a$%cost%&7." +interface.selector.middleclick = "&6Middle Click &7to edit positioning." interface.hologram.previewonly = "Click to Preview!" interface.hologram.preview = "Right-Click to Preview!" interface.hologram.buylink = "Left-Click for Buy Link!"