Transition to Maven

This commit is contained in:
Erik Broes
2011-01-01 11:23:14 +01:00
parent 995ef8f5ad
commit f46d9ada1c
42 changed files with 31 additions and 5 deletions

View File

@@ -0,0 +1,59 @@
package org.bukkit.event.block;
import org.bukkit.Block;
import org.bukkit.ItemStack;
import org.bukkit.Material;
import org.bukkit.event.Event;
/**
* Thrown when a block physics check is called
*
* @author Dinnerbone
*/
public class BlockPhysicsEvent extends BlockEvent {
private final int changed;
private boolean cancel = false;
public BlockPhysicsEvent(final Event.Type type, final Block block, final int changed) {
super(type, block);
this.changed = changed;
}
/**
* Gets the type of block that changed, causing this event
*
* @return Changed block's type ID
*/
public int getChangedTypeID() {
return changed;
}
/**
* Gets the type of block that changed, causing this event
*
* @return Changed block's type
*/
public Material getChangedType() {
return Material.getMaterial(changed);
}
/**
* 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;
}
}