From 9f27165aea9867545d2a541dbf8fd9aec400b68d Mon Sep 17 00:00:00 2001 From: Ghost_chu <2908803755@qq.com> Date: Thu, 12 Dec 2019 09:32:06 +0800 Subject: [PATCH] Fix storedenchant chat message only right half line was printed. Former-commit-id: 6382b2b9615ebbc23b614da765333e08c7cc9654 [formerly 05c52cf56e4790767bc660b0359fb5369df4b2a4] Former-commit-id: 313d4343fc11dc1f5fb56d84f94f4eb996dbdc13 --- .../maxgamer/quickshop/Util/ItemMatcher.java | 18 +++++++++--------- .../org/maxgamer/quickshop/Util/MsgUtil.java | 3 ++- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/src/main/java/org/maxgamer/quickshop/Util/ItemMatcher.java b/src/main/java/org/maxgamer/quickshop/Util/ItemMatcher.java index 129852161..e92b7ffb3 100644 --- a/src/main/java/org/maxgamer/quickshop/Util/ItemMatcher.java +++ b/src/main/java/org/maxgamer/quickshop/Util/ItemMatcher.java @@ -205,16 +205,16 @@ class ItemMetaMatcher { if (!Util.mapMatches(enchMap1, enchMap2)) { return false; } - if (!(meta1 instanceof EnchantmentStorageMeta)) { - return true; - } else { - if (!(meta2 instanceof EnchantmentStorageMeta)) { - return false; - } - Map stor1 = ((EnchantmentStorageMeta) meta1).getStoredEnchants(); - Map stor2 = ((EnchantmentStorageMeta) meta2).getStoredEnchants(); - return Util.mapMatches(stor1, stor2); + } + if (!(meta1 instanceof EnchantmentStorageMeta)) { + return true; + } else { + if (!(meta2 instanceof EnchantmentStorageMeta)) { + return false; } + Map stor1 = ((EnchantmentStorageMeta) meta1).getStoredEnchants(); + Map stor2 = ((EnchantmentStorageMeta) meta2).getStoredEnchants(); + return Util.mapMatches(stor1, stor2); } } diff --git a/src/main/java/org/maxgamer/quickshop/Util/MsgUtil.java b/src/main/java/org/maxgamer/quickshop/Util/MsgUtil.java index d30901e81..46d24ae60 100644 --- a/src/main/java/org/maxgamer/quickshop/Util/MsgUtil.java +++ b/src/main/java/org/maxgamer/quickshop/Util/MsgUtil.java @@ -830,7 +830,8 @@ public class MsgUtil { stor.getStoredEnchants(); enchs = stor.getStoredEnchants(); if (!enchs.isEmpty()) { - chatSheetPrinter.printLine(MsgUtil.getMessage("menu.stored-enchants", p) + MsgUtil + chatSheetPrinter.printLine(MsgUtil + .getMessage("tableformat.left_half_line", p) + MsgUtil.getMessage("menu.stored-enchants", p) + MsgUtil .getMessage("tableformat.right_half_line", p)); for (Entry entries : enchs.entrySet()) { chatSheetPrinter.printLine(ChatColor.YELLOW + MsgUtil.getEnchi18n(entries.getKey()) + " " + entries