Search in sources :

Example 1 with EnderChest

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);
    }
}
Also used : MaterialData(org.bukkit.material.MaterialData) EnderChest(org.bukkit.material.EnderChest)

Aggregations

EnderChest (org.bukkit.material.EnderChest)1 MaterialData (org.bukkit.material.MaterialData)1