use of org.bukkit.material.EnderChest in project Glowstone by GlowstoneMC.
the class BlockEnderChest method placeBlock.
@Override
public void placeBlock(GlowPlayer player, GlowBlockState state, BlockFace face, ItemStack holding, Vector clickedLoc) {
super.placeBlock(player, state, face, holding, clickedLoc);
MaterialData data = state.getData();
if (data instanceof EnderChest) {
((EnderChest) data).setFacingDirection(getOppositeBlockFace(player.getLocation(), false));
state.setData(data);
} else {
warnMaterialData(EnderChest.class, data);
}
}
Aggregations