mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-24 22:26:45 +01:00
Change the default sign orientation to better match the wall location
This commit is contained in:
parent
3a6f845c01
commit
efc2083798
@ -347,14 +347,16 @@ public class BukkitUtil extends WorldUtil {
|
|||||||
final Block block = world.getBlockAt(location.getX(), location.getY(), location.getZ());
|
final Block block = world.getBlockAt(location.getX(), location.getY(), location.getZ());
|
||||||
final Material type = block.getType();
|
final Material type = block.getType();
|
||||||
if (type != Material.LEGACY_SIGN && type != Material.LEGACY_WALL_SIGN) {
|
if (type != Material.LEGACY_SIGN && type != Material.LEGACY_WALL_SIGN) {
|
||||||
BlockFace facing = BlockFace.EAST;
|
BlockFace facing = BlockFace.NORTH;
|
||||||
if (world.getBlockAt(location.getX(), location.getY(), location.getZ() + 1).getType().isSolid()) {
|
if (!world.getBlockAt(location.getX(), location.getY(), location.getZ() + 1).getType().isSolid()) {
|
||||||
facing = BlockFace.NORTH;
|
if (world.getBlockAt(location.getX() - 1, location.getY(), location.getZ()).getType().isSolid()) {
|
||||||
|
facing = BlockFace.EAST;
|
||||||
} else if (world.getBlockAt(location.getX() + 1, location.getY(), location.getZ()).getType().isSolid()) {
|
} else if (world.getBlockAt(location.getX() + 1, location.getY(), location.getZ()).getType().isSolid()) {
|
||||||
facing = BlockFace.WEST;
|
facing = BlockFace.WEST;
|
||||||
} else if (world.getBlockAt(location.getX(), location.getY(), location.getZ() - 1).getType().isSolid()) {
|
} else if (world.getBlockAt(location.getX(), location.getY(), location.getZ() - 1).getType().isSolid()) {
|
||||||
facing = BlockFace.SOUTH;
|
facing = BlockFace.SOUTH;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if (PlotSquared.platform().serverVersion()[1] == 13) {
|
if (PlotSquared.platform().serverVersion()[1] == 13) {
|
||||||
block.setType(Material.valueOf(area.legacySignMaterial()), false);
|
block.setType(Material.valueOf(area.legacySignMaterial()), false);
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user