From 9201d497f7863802aea5c84db238433e743b1d78 Mon Sep 17 00:00:00 2001 From: Altruiis <71913030+Altruiis@users.noreply.github.com> Date: Wed, 16 Feb 2022 16:38:18 -0800 Subject: [PATCH] Localized lore --- src/main/java/tsp/headdb/inventory/InventoryUtils.java | 2 +- src/main/resources/messages.yml | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/tsp/headdb/inventory/InventoryUtils.java b/src/main/java/tsp/headdb/inventory/InventoryUtils.java index 72bec9a..233cb04 100644 --- a/src/main/java/tsp/headdb/inventory/InventoryUtils.java +++ b/src/main/java/tsp/headdb/inventory/InventoryUtils.java @@ -183,7 +183,7 @@ public class InventoryUtils { ItemMeta meta = item.getItemMeta(); meta.setDisplayName(Utils.colorize(localization.getMessage("menu.heads." + category.getName()))); List lore = new ArrayList<>(); - lore.add(Utils.colorize("&e" + HeadAPI.getHeads(category).size() + " heads")); + lore.add(Utils.colorize(localization.getMessage("menu.lore").replace("%size%", String.valueOf(HeadAPI.getHeads(category).size())))); meta.setLore(lore); item.setItemMeta(meta); inventory.setItem(getUILocation(category.getName(), category.getLocation()), item); diff --git a/src/main/resources/messages.yml b/src/main/resources/messages.yml index b6550dc..6507fb0 100644 --- a/src/main/resources/messages.yml +++ b/src/main/resources/messages.yml @@ -11,6 +11,7 @@ menu: search: "&c&lHeadDB &8- &eSearch: %search%" favorites: "&c&lHeadDB &8- &eFavorites: %player%" local: "&c&lHeadDB &8- &aLocal Heads &7(%size%)" + lore: "&e%size% heads" heads: alphabet: "&e&lALPHABET" animals: "&3&lANIMALS"