use of org.bukkit.inventory.meta.BlockDataMeta in project Denizen-For-Bukkit by DenizenScript.
the class ItemBlockMaterial method adjust.
@Override
public void adjust(Mechanism mechanism) {
// -->
if (mechanism.matches("block_material") && mechanism.requireObject(MaterialTag.class)) {
BlockDataMeta meta = (BlockDataMeta) item.getItemMeta();
MaterialTag mat = mechanism.valueAsType(MaterialTag.class);
meta.setBlockData(mat.getModernData());
item.setItemMeta(meta);
}
}
Aggregations