mirror of
https://github.com/PaperMC/Paper.git
synced 2025-02-17 18:47:40 +01:00
Removed cancellable import
By: durron597 <martin.jared@gmail.com>
This commit is contained in:
parent
e8a16bb993
commit
f5b05b2c92
1 changed files with 32 additions and 33 deletions
|
@ -5,43 +5,42 @@ package org.bukkit.event.block;
|
|||
|
||||
import org.bukkit.Block;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.event.Cancellable;
|
||||
|
||||
/**
|
||||
* @author durron597
|
||||
*/
|
||||
public class BlockCanBuildEvent extends BlockEvent {
|
||||
protected boolean buildable;
|
||||
protected int material;
|
||||
|
||||
public BlockCanBuildEvent(Type type, Block block, int id, boolean canBuild) {
|
||||
super(type, block);
|
||||
buildable = canBuild;
|
||||
material = id;
|
||||
}
|
||||
protected boolean buildable;
|
||||
protected int material;
|
||||
|
||||
/**
|
||||
* Returns whether or not the block can be built here. By default, returns
|
||||
* Minecraft's answer on whether the block can be built
|
||||
*
|
||||
* @return boolean whether or not the block can be built
|
||||
*/
|
||||
public boolean isBuildable() {
|
||||
return buildable;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set whether the block can be built here.
|
||||
*/
|
||||
public void setBuildable(boolean cancel) {
|
||||
this.buildable = cancel;
|
||||
}
|
||||
|
||||
public Material getMaterial() {
|
||||
return Material.getMaterial(material);
|
||||
}
|
||||
|
||||
public int getMaterialID() {
|
||||
return material;
|
||||
}
|
||||
public BlockCanBuildEvent(Type type, Block block, int id, boolean canBuild) {
|
||||
super(type, block);
|
||||
buildable = canBuild;
|
||||
material = id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns whether or not the block can be built here. By default, returns
|
||||
* Minecraft's answer on whether the block can be built
|
||||
*
|
||||
* @return boolean whether or not the block can be built
|
||||
*/
|
||||
public boolean isBuildable() {
|
||||
return buildable;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set whether the block can be built here.
|
||||
*/
|
||||
public void setBuildable(boolean cancel) {
|
||||
this.buildable = cancel;
|
||||
}
|
||||
|
||||
public Material getMaterial() {
|
||||
return Material.getMaterial(material);
|
||||
}
|
||||
|
||||
public int getMaterialID() {
|
||||
return material;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue