From 11dcd3c4b899752b9cd956a7027a891412287c3d Mon Sep 17 00:00:00 2001 From: Ghost_chu <2908803755@qq.com> Date: Fri, 23 Aug 2019 15:07:52 +0800 Subject: [PATCH] Optimize the performance on DisplayItem checking Former-commit-id: 44800172607e2e2a46c6736afb608046ec996f1e [formerly f05ad24f3c8f723733a2c8e3e169fb6cd7f66ef1] Former-commit-id: ffbbe26fcc44a5694e17a04cb08ec7c9c712c632 --- src/main/java/org/maxgamer/quickshop/Shop/DisplayItem.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/maxgamer/quickshop/Shop/DisplayItem.java b/src/main/java/org/maxgamer/quickshop/Shop/DisplayItem.java index 9cdb5aa06..f0ad8df33 100644 --- a/src/main/java/org/maxgamer/quickshop/Shop/DisplayItem.java +++ b/src/main/java/org/maxgamer/quickshop/Shop/DisplayItem.java @@ -36,13 +36,15 @@ public interface DisplayItem { if (iMeta.hasDisplayName()) { if (iMeta.getDisplayName().toLowerCase().contains("quickshop displayitem")) { return true; + }else{ + return false; } } if (!iMeta.hasLore()) { return false; } List lores = iMeta.getLore(); - Gson gson = new Gson(); + Gson gson = new Gson(); for (String lore : lores) { try { ShopProtectionFlag shopProtectionFlag = gson.fromJson(lore, ShopProtectionFlag.class);