use of org.bukkit.material.Banner in project Glowstone by GlowstoneMC.
the class BlockBanner 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 Banner)) {
warnMaterialData(Banner.class, data);
return;
}
Banner banner = (Banner) data;
if (banner.isWallBanner()) {
banner.setFacingDirection(face);
} else {
banner.setFacingDirection(player.getFacing().getOppositeFace());
}
}
Aggregations