use of org.bukkit.block.data.type.WallSign in project MagicPlugin by elBukkit.
the class CompatibilityUtils method getSignFacing.
@Override
public BlockFace getSignFacing(Block signBlock) {
BlockData blockData = signBlock.getBlockData();
if (!(blockData instanceof WallSign)) {
return null;
}
WallSign sign = (WallSign) blockData;
return sign.getFacing();
}
use of org.bukkit.block.data.type.WallSign in project MagicPlugin by elBukkit.
the class CompatibilityUtils method getSignFacing.
@Override
public BlockFace getSignFacing(Block signBlock) {
BlockData blockData = signBlock.getBlockData();
if (!(blockData instanceof WallSign)) {
return null;
}
WallSign sign = (WallSign) blockData;
return sign.getFacing();
}
use of org.bukkit.block.data.type.WallSign in project MagicPlugin by elBukkit.
the class CompatibilityUtils method getSignFacing.
@Override
public BlockFace getSignFacing(Block signBlock) {
BlockData blockData = signBlock.getBlockData();
if (!(blockData instanceof WallSign)) {
return null;
}
WallSign sign = (WallSign) blockData;
return sign.getFacing();
}
use of org.bukkit.block.data.type.WallSign in project MagicPlugin by elBukkit.
the class CompatibilityUtils method getSignFacing.
@Override
public BlockFace getSignFacing(Block signBlock) {
BlockData blockData = signBlock.getBlockData();
if (!(blockData instanceof WallSign)) {
return null;
}
WallSign sign = (WallSign) blockData;
return sign.getFacing();
}
use of org.bukkit.block.data.type.WallSign in project AreaShop by NLthijs48.
the class BukkitHandler1_13 method getSignFacing.
// Uses BlockData, which does not yet exist in 1.12-
@Override
public BlockFace getSignFacing(Block block) {
if (block == null) {
return null;
}
BlockState blockState = block.getState();
if (blockState == null) {
return null;
}
BlockData blockData = blockState.getBlockData();
if (blockData == null) {
return null;
}
if (blockData instanceof WallSign) {
return ((WallSign) blockData).getFacing();
} else if (blockData instanceof Sign) {
return ((Sign) blockData).getRotation();
}
return null;
}
Aggregations