Java Code Examples for org.bukkit.block.Banner#getData()
The following examples show how to use
org.bukkit.block.Banner#getData() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: Banners.java From ProjectAres with GNU Affero General Public License v3.0 | 6 votes |
public static boolean placeStanding(Location location, BannerMeta meta) { Block block = location.getBlock(); block.setType(Material.STANDING_BANNER, false); final BlockState state = block.getState(); if(state instanceof Banner) { Banner banner = (Banner) block.getState(); applyToBlock(banner, meta); org.bukkit.material.Banner material = (org.bukkit.material.Banner) banner.getData(); material.setFacingDirection(BlockFaces.yawToFace(location.getYaw())); banner.setData(material); banner.update(true); return true; } return false; }
Example 2
Source File: Materials.java From PGM with GNU Affero General Public License v3.0 | 5 votes |
static void placeStanding(Location location, BannerMeta meta) { Block block = location.getBlock(); block.setType(Material.STANDING_BANNER); Banner banner = (Banner) block.getState(); applyToBlock(banner, meta); org.bukkit.material.Banner material = (org.bukkit.material.Banner) banner.getData(); material.setFacingDirection(BlockFaces.yawToFace(location.getYaw())); banner.setData(material); banner.update(true); }