aboutsummaryrefslogtreecommitdiffstats
path: root/bukkit/src/main/java/com
diff options
context:
space:
mode:
authorKrakenied <krakenied1@gmail.com>2025-07-20 15:46:24 +0200
committerKrakenied <46192742+Krakenied@users.noreply.github.com>2025-07-29 00:06:46 +0200
commit009f4c86651a96ddd9dbfd0a18b11ae472adae0f (patch)
tree23b8047d02aa2d6535b86a0316e83459b0bcf627 /bukkit/src/main/java/com
parenta161489241fefaba51b9612e7b0e3c5ecf4292eb (diff)
Check for CoreProtect block lookup nullability as it seems to be null when the user disables CoreProtect API
https://github.com/LMBishop/Quests/issues/801
Diffstat (limited to 'bukkit/src/main/java/com')
-rw-r--r--bukkit/src/main/java/com/leonardobishop/quests/bukkit/hook/coreprotect/CoreProtectHook.java8
1 files changed, 8 insertions, 0 deletions
diff --git a/bukkit/src/main/java/com/leonardobishop/quests/bukkit/hook/coreprotect/CoreProtectHook.java b/bukkit/src/main/java/com/leonardobishop/quests/bukkit/hook/coreprotect/CoreProtectHook.java
index e2bf8e78..348928cb 100644
--- a/bukkit/src/main/java/com/leonardobishop/quests/bukkit/hook/coreprotect/CoreProtectHook.java
+++ b/bukkit/src/main/java/com/leonardobishop/quests/bukkit/hook/coreprotect/CoreProtectHook.java
@@ -48,6 +48,14 @@ public class CoreProtectHook implements AbstractCoreProtectHook {
}
List<String[]> blockLookup = api.blockLookup(block, time);
+
+ if (blockLookup == null) {
+ plugin.getLogger().severe("CoreProtect block lookup returned null! Please ensure, that the CoreProtect API is enabled in its config.");
+
+ plugin.getScheduler().doSync(() -> future.complete(true));
+ return;
+ }
+
boolean first = true;
for (String[] result : blockLookup) {