From 641e3840cba422fd6d5768a82681f773b110d27a Mon Sep 17 00:00:00 2001 From: Hannes Greule Date: Sun, 13 Oct 2024 10:31:08 +0200 Subject: [PATCH] Do not check interactions outside plot areas (#4515) --- .../main/java/com/plotsquared/core/util/EventDispatcher.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Core/src/main/java/com/plotsquared/core/util/EventDispatcher.java b/Core/src/main/java/com/plotsquared/core/util/EventDispatcher.java index e20957b28..b19a4d751 100644 --- a/Core/src/main/java/com/plotsquared/core/util/EventDispatcher.java +++ b/Core/src/main/java/com/plotsquared/core/util/EventDispatcher.java @@ -371,7 +371,10 @@ public class EventDispatcher { Location location, BlockType blockType, boolean notifyPerms ) { PlotArea area = location.getPlotArea(); - assert area != null; + // the interaction target location might be outside a plot area + if (area == null) { + return true; + } if (!area.buildRangeContainsY(location.getY()) && !player.hasPermission(Permission.PERMISSION_ADMIN_BUILD_HEIGHT_LIMIT)) { player.sendMessage( TranslatableCaption.of("height.height_limit"),