Bukkit/src/main/java/org/bukkit/event/block/LeavesDecayEvent.java
2011-05-15 14:06:02 +02:00

36 lines
945 B
Java

package org.bukkit.event.block;
import org.bukkit.block.Block;
import org.bukkit.event.Cancellable;
/**
* Called on leaves decaying
*/
public class LeavesDecayEvent extends BlockEvent implements Cancellable {
private boolean cancel = false;
public LeavesDecayEvent(final Block block) {
super(Type.LEAVES_DECAY, block);
}
/**
* 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;
}
}