Changed BlockCanBuildEvent to store the int and not the material
This commit is contained in:
parent
d6442bdea1
commit
7b6539422b
@ -12,12 +12,12 @@ import org.bukkit.event.Cancellable;
|
||||
*/
|
||||
public class BlockCanBuildEvent extends BlockEvent {
|
||||
protected boolean buildable;
|
||||
protected Material material;
|
||||
protected int material;
|
||||
|
||||
public BlockCanBuildEvent(Type type, Block block, Material mat, boolean canBuild) {
|
||||
public BlockCanBuildEvent(Type type, Block block, int id, boolean canBuild) {
|
||||
super(type, block);
|
||||
buildable = canBuild;
|
||||
material = mat;
|
||||
material = id;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -38,10 +38,10 @@ public class BlockCanBuildEvent extends BlockEvent {
|
||||
}
|
||||
|
||||
public Material getMaterial() {
|
||||
return material;
|
||||
return Material.getMaterial(material);
|
||||
}
|
||||
|
||||
public int getMaterialID() {
|
||||
return material.getID();
|
||||
return material;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user