Removed cancellable import
This commit is contained in:
parent
7b6539422b
commit
53d287854e
@ -5,43 +5,42 @@ package org.bukkit.event.block;
|
|||||||
|
|
||||||
import org.bukkit.Block;
|
import org.bukkit.Block;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.event.Cancellable;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author durron597
|
* @author durron597
|
||||||
*/
|
*/
|
||||||
public class BlockCanBuildEvent extends BlockEvent {
|
public class BlockCanBuildEvent extends BlockEvent {
|
||||||
protected boolean buildable;
|
protected boolean buildable;
|
||||||
protected int material;
|
protected int material;
|
||||||
|
|
||||||
public BlockCanBuildEvent(Type type, Block block, int id, boolean canBuild) {
|
public BlockCanBuildEvent(Type type, Block block, int id, boolean canBuild) {
|
||||||
super(type, block);
|
super(type, block);
|
||||||
buildable = canBuild;
|
buildable = canBuild;
|
||||||
material = id;
|
material = id;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns whether or not the block can be built here. By default, returns
|
* Returns whether or not the block can be built here. By default, returns
|
||||||
* Minecraft's answer on whether the block can be built
|
* Minecraft's answer on whether the block can be built
|
||||||
*
|
*
|
||||||
* @return boolean whether or not the block can be built
|
* @return boolean whether or not the block can be built
|
||||||
*/
|
*/
|
||||||
public boolean isBuildable() {
|
public boolean isBuildable() {
|
||||||
return buildable;
|
return buildable;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set whether the block can be built here.
|
* Set whether the block can be built here.
|
||||||
*/
|
*/
|
||||||
public void setBuildable(boolean cancel) {
|
public void setBuildable(boolean cancel) {
|
||||||
this.buildable = cancel;
|
this.buildable = cancel;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Material getMaterial() {
|
public Material getMaterial() {
|
||||||
return Material.getMaterial(material);
|
return Material.getMaterial(material);
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getMaterialID() {
|
public int getMaterialID() {
|
||||||
return material;
|
return material;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user