From 6c30c83e910dd46e731a46d570d2a39ce5b1ecbb Mon Sep 17 00:00:00 2001 From: Bukkit/Spigot Date: Sat, 1 Jan 2011 01:20:44 -0500 Subject: [PATCH] Implemented BLOCK_CANBUILD By: durron597 --- .../bukkit/event/block/BlockCanBuildEvent.java | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/paper-api/src/org/bukkit/event/block/BlockCanBuildEvent.java b/paper-api/src/org/bukkit/event/block/BlockCanBuildEvent.java index ebbe83c9a8..859c8d3067 100644 --- a/paper-api/src/org/bukkit/event/block/BlockCanBuildEvent.java +++ b/paper-api/src/org/bukkit/event/block/BlockCanBuildEvent.java @@ -12,15 +12,26 @@ import org.bukkit.event.Cancellable; public class BlockCanBuildEvent extends BlockEvent implements Cancellable { protected boolean cancel; - public BlockCanBuildEvent(Type type, Block block) { + public BlockCanBuildEvent(Type type, Block block, boolean canBuild) { super(type, block); + + cancel = canBuild; } - + + /** + * Returns whether or not the block can be built here. By default, returns + * Minecraft's answer on whether the block can be built + * + * @return boolean whether or not the block can be built + */ @Override public boolean isCancelled() { return cancel; } - + + /** + * Set whether the block can be built here. + */ @Override public void setCancelled(boolean cancel) { this.cancel = cancel;