mirror of
https://github.com/EngineHub/WorldGuard.git
synced 2024-12-23 01:27:40 +01:00
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 void onEntityInteract(EntityInteractEvent event) {
|
||||
|
||||
@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
Block a user