From 4bc5e989e007e3ca6479a779f34a2688498ce3c6 Mon Sep 17 00:00:00 2001 From: PikaMug <2267126+PikaMug@users.noreply.github.com> Date: Fri, 31 Jan 2020 02:48:08 -0500 Subject: [PATCH] Translate enchantment names for refused deliveries --- .../me/blackvein/quests/listeners/NpcListener.java | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/main/src/main/java/me/blackvein/quests/listeners/NpcListener.java b/main/src/main/java/me/blackvein/quests/listeners/NpcListener.java index c4b676bbe..376dc655a 100644 --- a/main/src/main/java/me/blackvein/quests/listeners/NpcListener.java +++ b/main/src/main/java/me/blackvein/quests/listeners/NpcListener.java @@ -13,6 +13,7 @@ package me.blackvein.quests.listeners; import java.text.MessageFormat; +import java.util.HashMap; import java.util.LinkedList; import java.util.Map.Entry; @@ -165,12 +166,16 @@ public class NpcListener implements Listener { if (hand.getType().equals(Material.ENCHANTED_BOOK)) { EnchantmentStorageMeta esmeta = (EnchantmentStorageMeta) hand.getItemMeta(); if (esmeta.hasStoredEnchants()) { - // TODO translate enchantment names + // TODO translate Roman numerals for (Entry e : esmeta.getStoredEnchants() .entrySet()) { - player.sendMessage(ChatColor.GRAY + "\u2515 " + ChatColor.DARK_GREEN - + ItemUtil.getPrettyEnchantmentName(e.getKey()) + " " - + RomanNumeral.getNumeral(e.getValue()) + "\n"); + HashMap single + = new HashMap(); + single.put(e.getKey(), e.getValue()); + plugin.getLocaleQuery().sendMessage(player, ChatColor.GRAY + "\u2515 " + + ChatColor.DARK_GREEN + + " " + RomanNumeral.getNumeral(e.getValue()) + + "\n", single); } } }