From 740077970e6bab257d9f1374ee3a8fda9325be39 Mon Sep 17 00:00:00 2001 From: Bukkit/Spigot Date: Tue, 4 Jan 2011 22:05:53 +0000 Subject: [PATCH] Javadoc By: Dinnerbone --- .../bukkit/event/block/BlockPlacedEvent.java | 24 ++++++++++++++----- .../event/world/ChunkUnloadedEvent.java | 13 +++++++++- 2 files changed, 30 insertions(+), 7 deletions(-) diff --git a/paper-api/src/main/java/org/bukkit/event/block/BlockPlacedEvent.java b/paper-api/src/main/java/org/bukkit/event/block/BlockPlacedEvent.java index 030a2dd92a..6bc1896877 100644 --- a/paper-api/src/main/java/org/bukkit/event/block/BlockPlacedEvent.java +++ b/paper-api/src/main/java/org/bukkit/event/block/BlockPlacedEvent.java @@ -11,24 +11,36 @@ public class BlockPlacedEvent extends BlockEvent implements Cancellable { private boolean cancel; private Player player; - /** - * @param type - * @param theBlock - */ public BlockPlacedEvent(Type type, Block theBlock) { super(type, theBlock); cancel = false; } - + + /** + * Gets the player who placed this block + * + * @return Player who placed the block + */ public Player getPlayer() { return player; } + /** + * Gets the cancellation state of this event. A cancelled event will not + * be executed in the server, but will still pass to other plugins + * + * @return true if this event is cancelled + */ public boolean isCancelled() { - // TODO Auto-generated method stub return cancel; } + /** + * Sets the cancellation state of this event. A cancelled event will not + * be executed in the server, but will still pass to other plugins + * + * @param cancel true if you wish to cancel this event + */ public void setCancelled(boolean cancel) { this.cancel = cancel; } diff --git a/paper-api/src/main/java/org/bukkit/event/world/ChunkUnloadedEvent.java b/paper-api/src/main/java/org/bukkit/event/world/ChunkUnloadedEvent.java index 3aa8922149..fc9d57b1de 100644 --- a/paper-api/src/main/java/org/bukkit/event/world/ChunkUnloadedEvent.java +++ b/paper-api/src/main/java/org/bukkit/event/world/ChunkUnloadedEvent.java @@ -14,12 +14,23 @@ public class ChunkUnloadedEvent extends ChunkLoadedEvent implements Cancellable super(type, chunk); } + /** + * Gets the cancellation state of this event. A cancelled event will not + * be executed in the server, but will still pass to other plugins + * + * @return true if this event is cancelled + */ public boolean isCancelled() { return cancel; } + /** + * Sets the cancellation state of this event. A cancelled event will not + * be executed in the server, but will still pass to other plugins + * + * @param cancel true if you wish to cancel this event + */ public void setCancelled(boolean cancel) { this.cancel = cancel; } - }