From 38f1e304e00d3fff514f4deacde024e494cc9782 Mon Sep 17 00:00:00 2001 From: Intelli Date: Tue, 20 Jul 2021 14:59:57 -0600 Subject: [PATCH] Fixed entities not being excluded when using the "exclude" parameter --- src/main/java/net/coreprotect/database/Lookup.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/net/coreprotect/database/Lookup.java b/src/main/java/net/coreprotect/database/Lookup.java index cc8247b..9b9593e 100755 --- a/src/main/java/net/coreprotect/database/Lookup.java +++ b/src/main/java/net/coreprotect/database/Lookup.java @@ -559,7 +559,7 @@ public class Lookup extends Queue { queryEntity = queryEntity.replace("type NOT IN(" + (excludeBlock.length() > 0 ? excludeBlock : "0") + ")", "type NOT IN(" + (excludeEntity.length() > 0 ? excludeEntity : "0") + ")"); } - String baseQuery = (includeEntity.length() > 0 ? queryEntity : queryBlock); + String baseQuery = ((!includeEntity.isEmpty() || !excludeEntity.isEmpty()) ? queryEntity : queryBlock); if (limitOffset > -1 && limitCount > -1) { queryLimit = " LIMIT " + limitOffset + ", " + limitCount + ""; }