From e8c170686cf2dda6cf60a0582e0bd60bd3e79c13 Mon Sep 17 00:00:00 2001 From: Hannes Greule Date: Fri, 28 Feb 2025 10:11:54 +0100 Subject: [PATCH] Fix IndexOutOfBoundsException on BlockFertilizeEvent (#4609) --- .../com/plotsquared/bukkit/listener/BlockEventListener117.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Bukkit/src/main/java/com/plotsquared/bukkit/listener/BlockEventListener117.java b/Bukkit/src/main/java/com/plotsquared/bukkit/listener/BlockEventListener117.java index 0909001b4..16293a05b 100644 --- a/Bukkit/src/main/java/com/plotsquared/bukkit/listener/BlockEventListener117.java +++ b/Bukkit/src/main/java/com/plotsquared/bukkit/listener/BlockEventListener117.java @@ -134,7 +134,7 @@ public class BlockEventListener117 implements Listener { public void onBlockFertilize(BlockFertilizeEvent event) { Block block = event.getBlock(); List blocks = event.getBlocks(); - Location location = BukkitUtil.adapt(blocks.get(0).getLocation()); + Location location = BukkitUtil.adapt(block.getLocation()); PlotArea area = location.getPlotArea(); if (area == null) {