Optimize the performance on DisplayItem checking

Former-commit-id: 44800172607e2e2a46c6736afb608046ec996f1e [formerly f05ad24f3c8f723733a2c8e3e169fb6cd7f66ef1]
Former-commit-id: ffbbe26fcc44a5694e17a04cb08ec7c9c712c632
This commit is contained in:
Ghost_chu committed 2019-08-23 15:07:52 +08:00
1 parent 2f180b2aa2
commit 11dcd3c4b8
1 file changed
+3 -1
@@ -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<String> lores = iMeta.getLore();
Gson gson = new Gson();
Gson gson = new Gson();
for (String lore : lores) {
try {
ShopProtectionFlag shopProtectionFlag = gson.fromJson(lore, ShopProtectionFlag.class);