Files
Bukkit/src/main/java/org/bukkit/event/block/BlockPlacedEvent.java
Dinnerbone 05499e1f56 Javadoc
2011-01-04 22:05:53 +00:00

49 lines
1.1 KiB
Java

package org.bukkit.event.block;
import org.bukkit.Block;
import org.bukkit.Player;
import org.bukkit.event.Cancellable;
/**
* Not implemented yet
*/
public class BlockPlacedEvent extends BlockEvent implements Cancellable {
private boolean cancel;
private Player player;
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() {
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;
}
}