From 7c61a335714e25a7d7d17f143302c0ec9d2543c7 Mon Sep 17 00:00:00 2001 From: Intelli Date: Thu, 4 Jan 2024 17:56:30 -0700 Subject: [PATCH] Added ability to exclude specific block types in blacklist (implements #444) --- .../net/coreprotect/database/logger/BlockBreakLogger.java | 4 ++++ .../net/coreprotect/database/logger/BlockPlaceLogger.java | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/src/main/java/net/coreprotect/database/logger/BlockBreakLogger.java b/src/main/java/net/coreprotect/database/logger/BlockBreakLogger.java index 1b9f888a..9d3b7872 100644 --- a/src/main/java/net/coreprotect/database/logger/BlockBreakLogger.java +++ b/src/main/java/net/coreprotect/database/logger/BlockBreakLogger.java @@ -37,6 +37,10 @@ else if (checkType.equals(Material.AIR) || checkType.equals(Material.CAVE_AIR)) return; } + if (ConfigHandler.blacklist.get(checkType.getKey().toString()) != null) { + return; + } + if (!user.startsWith("#")) { CacheHandler.spreadCache.remove(location); } diff --git a/src/main/java/net/coreprotect/database/logger/BlockPlaceLogger.java b/src/main/java/net/coreprotect/database/logger/BlockPlaceLogger.java index ed492149..cfc30e17 100644 --- a/src/main/java/net/coreprotect/database/logger/BlockPlaceLogger.java +++ b/src/main/java/net/coreprotect/database/logger/BlockPlaceLogger.java @@ -55,6 +55,10 @@ else if (forceType != null && !type.equals(forceType)) { return; } + if (ConfigHandler.blacklist.get(type.getKey().toString()) != null) { + return; + } + int x = block.getX(); int y = block.getY(); int z = block.getZ();