mirror of
https://github.com/EarthMC/QuickShop-Reremake.git
synced 2026-11-24 17:39:52 -05:00
Optimize the performance on DisplayItem checking
Former-commit-id: 44800172607e2e2a46c6736afb608046ec996f1e [formerly f05ad24f3c8f723733a2c8e3e169fb6cd7f66ef1] Former-commit-id: ffbbe26fcc44a5694e17a04cb08ec7c9c712c632
This commit is contained in:
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);
|
||||
|
||||
Reference in new issue
Block a user