Fix IndexOutOfBoundsException on BlockFertilizeEvent (#4609)

This commit is contained in:
Hannes Greule 2025-02-28 10:11:54 +01:00 committed by GitHub
parent ff8676cde3
commit e8c170686c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -134,7 +134,7 @@ public class BlockEventListener117 implements Listener {
public void onBlockFertilize(BlockFertilizeEvent event) {
Block block = event.getBlock();
List<org.bukkit.block.BlockState> blocks = event.getBlocks();
Location location = BukkitUtil.adapt(blocks.get(0).getLocation());
Location location = BukkitUtil.adapt(block.getLocation());
PlotArea area = location.getPlotArea();
if (area == null) {