Ignore BlockFertilizeEvent with empty list.
Plugins can clear this list without fully cancelling the event. Fixes #1723
This commit is contained in:
parent
129d27351a
commit
aeea455560
|
@ -560,6 +560,7 @@ public class EventAbstractionListener extends AbstractListener {
|
|||
|
||||
@EventHandler(ignoreCancelled = true)
|
||||
public void onBlockFertilize(BlockFertilizeEvent event) {
|
||||
if (event.getBlocks().isEmpty()) return;
|
||||
Cause cause = create(event.getPlayer(), event.getBlock());
|
||||
Events.fireToCancel(event, new PlaceBlockEvent(event, cause, event.getBlock().getWorld(), event.getBlocks()));
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue