Skip to content

Commit e8c1706

Browse files
authored
Fix IndexOutOfBoundsException on BlockFertilizeEvent (#4609)
1 parent ff8676c commit e8c1706

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Bukkit/src/main/java/com/plotsquared/bukkit/listener/BlockEventListener117.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ public void onBlockReceiveGame(BlockReceiveGameEvent event) {
134134
public void onBlockFertilize(BlockFertilizeEvent event) {
135135
Block block = event.getBlock();
136136
List<org.bukkit.block.BlockState> blocks = event.getBlocks();
137-
Location location = BukkitUtil.adapt(blocks.get(0).getLocation());
137+
Location location = BukkitUtil.adapt(block.getLocation());
138138

139139
PlotArea area = location.getPlotArea();
140140
if (area == null) {

0 commit comments

Comments
 (0)