From 3a0c86a6145018f357cb475be7e8c4e2f2d5c4a6 Mon Sep 17 00:00:00 2001 From: Intelli Date: Mon, 7 Feb 2022 17:39:33 -0700 Subject: [PATCH] Fixed some lookups being slow when specifying an action --- src/main/java/net/coreprotect/database/Lookup.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/net/coreprotect/database/Lookup.java b/src/main/java/net/coreprotect/database/Lookup.java index 4c41f8f..e4ec206 100755 --- a/src/main/java/net/coreprotect/database/Lookup.java +++ b/src/main/java/net/coreprotect/database/Lookup.java @@ -627,7 +627,7 @@ public class Lookup extends Queue { if ((index.equals("") && restrictWorld)) { index = "USE INDEX(wid) "; } - if ((radius != null || actionList.contains(5))) { + if ((radius != null || actionList.size() > 0)) { index = ""; } } @@ -645,7 +645,7 @@ public class Lookup extends Queue { if ((index.equals("") && restrictWorld)) { index = "INDEXED BY block_index "; } - if ((radius != null || actionList.contains(5))) { + if ((radius != null || actionList.size() > 0)) { index = ""; } }