From 979fcb71958f055706f17ecf4a26f98265a90cc5 Mon Sep 17 00:00:00 2001 From: Zrips Date: Fri, 23 Jun 2017 11:20:51 +0300 Subject: [PATCH] Fix for entity names not being translated in GUI --- src/main/java/com/gamingmesh/jobs/Gui/GuiManager.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/gamingmesh/jobs/Gui/GuiManager.java b/src/main/java/com/gamingmesh/jobs/Gui/GuiManager.java index 7af0a3be..d5ef99a5 100644 --- a/src/main/java/com/gamingmesh/jobs/Gui/GuiManager.java +++ b/src/main/java/com/gamingmesh/jobs/Gui/GuiManager.java @@ -197,7 +197,11 @@ public class GuiManager { + ".info"))); int y = 1; for (int z = 0; z < info.size(); z++) { - String itemName = Jobs.getNameTranslatorManager().Translate(info.get(z).getName(), info.get(z)); + + String itemName = info.get(z).getName().toLowerCase().replace('_', ' '); + itemName = Character.toUpperCase(itemName.charAt(0)) + itemName.substring(1); + itemName = Jobs.getNameTranslatorManager().Translate(itemName, info.get(z)); + itemName = org.bukkit.ChatColor.translateAlternateColorCodes('&', itemName); double income = info.get(z).getIncome(level, numjobs); income = income + (income * boost.getFinal(CurrencyType.MONEY));