diff --git a/paper-api/src/main/java/org/bukkit/event/block/BlockFormEvent.java b/paper-api/src/main/java/org/bukkit/event/block/BlockFormEvent.java index 7e65e50246..84835d2807 100644 --- a/paper-api/src/main/java/org/bukkit/event/block/BlockFormEvent.java +++ b/paper-api/src/main/java/org/bukkit/event/block/BlockFormEvent.java @@ -19,33 +19,11 @@ import org.bukkit.event.HandlerList; * * @see BlockSpreadEvent */ -public class BlockFormEvent extends BlockEvent implements Cancellable { +public class BlockFormEvent extends BlockGrowEvent implements Cancellable { private static final HandlerList handlers = new HandlerList(); - private boolean cancelled; - private final BlockState newState; public BlockFormEvent(final Block block, final BlockState newState) { - super(block); - this.block = block; - this.newState = newState; - this.cancelled = false; - } - - /** - * Gets the state of the block where it will form or spread to. - * - * @return The block state of the block where it will form or spread to - */ - public BlockState getNewState() { - return newState; - } - - public boolean isCancelled() { - return cancelled; - } - - public void setCancelled(boolean cancel) { - this.cancelled = cancel; + super(block, newState); } @Override diff --git a/paper-api/src/main/java/org/bukkit/event/block/BlockGrowEvent.java b/paper-api/src/main/java/org/bukkit/event/block/BlockGrowEvent.java new file mode 100644 index 0000000000..b1216df427 --- /dev/null +++ b/paper-api/src/main/java/org/bukkit/event/block/BlockGrowEvent.java @@ -0,0 +1,56 @@ +package org.bukkit.event.block; + +import org.bukkit.block.Block; +import org.bukkit.block.BlockState; +import org.bukkit.event.Cancellable; +import org.bukkit.event.HandlerList; + +/** + * Called when a block grows naturally in the world. + *
+ * Examples: + *