mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-28 07:20:24 +01:00
Changed BlockCanBuildEvent to store the int and not the material
By: durron597 <martin.jared@gmail.com>
This commit is contained in:
parent
ea16a44324
commit
e8a16bb993
1 changed files with 5 additions and 5 deletions
|
@ -12,12 +12,12 @@ import org.bukkit.event.Cancellable;
|
||||||
*/
|
*/
|
||||||
public class BlockCanBuildEvent extends BlockEvent {
|
public class BlockCanBuildEvent extends BlockEvent {
|
||||||
protected boolean buildable;
|
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);
|
super(type, block);
|
||||||
buildable = canBuild;
|
buildable = canBuild;
|
||||||
material = mat;
|
material = id;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -38,10 +38,10 @@ public class BlockCanBuildEvent extends BlockEvent {
|
||||||
}
|
}
|
||||||
|
|
||||||
public Material getMaterial() {
|
public Material getMaterial() {
|
||||||
return material;
|
return Material.getMaterial(material);
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getMaterialID() {
|
public int getMaterialID() {
|
||||||
return material.getID();
|
return material;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue