mirror of
https://github.com/EarthMC/QuickShop-Reremake.git
synced 2026-11-24 17:39:52 -05:00
Optimize the targetShopDisplayCheck performance
Former-commit-id: 539c1d93571be609bc40d731f4cc5ceaef323992 [formerly 7f4f5d49a0600480a96eb52c07685cac25f24e3a] Former-commit-id: 7aa7cd5b5837e5785d5599692c454ef66360fe0d
This commit is contained in:
1 parent
b375f3c7d3
commit
c8e792ee7b
1 file changed
+4
-1
@@ -95,11 +95,14 @@ public interface DisplayItem {
|
||||
Gson gson = new Gson();
|
||||
for (String lore : lores) {
|
||||
try {
|
||||
if (!lore.startsWith("{")) {
|
||||
continue;
|
||||
}
|
||||
ShopProtectionFlag shopProtectionFlag = gson.fromJson(lore, ShopProtectionFlag.class);
|
||||
if (shopProtectionFlag == null) {
|
||||
continue;
|
||||
}
|
||||
if (shopProtectionFlag.getMark() == null) {
|
||||
if (!shopProtectionFlag.getMark().equals(ShopProtectionFlag.getDefaultMark())) {
|
||||
continue;
|
||||
}
|
||||
if (shopProtectionFlag.getShopLocation().equals(shop.getLocation().toString())) {
|
||||
|
||||
Reference in new issue
Block a user