Only listen to WallSign when creating shops.
This commit is contained in:
@@ -81,11 +81,10 @@ public class PlayerListener extends EventListener {
|
||||
return;
|
||||
BlockFace facing;
|
||||
BlockData data = b.getState().getBlockData();
|
||||
if (data instanceof WallSign) {
|
||||
facing = ((Directional) data).getFacing();
|
||||
} else {
|
||||
facing = ((Rotatable) data).getRotation();
|
||||
if (!(data instanceof WallSign wallSign)) {
|
||||
return;
|
||||
}
|
||||
facing = wallSign.getFacing();
|
||||
|
||||
Block bRelative = b.getRelative(facing.getOppositeFace());
|
||||
|
||||
|
||||
@@ -122,11 +122,10 @@ public class ShopListener extends EventListener {
|
||||
|
||||
BlockFace facing;
|
||||
BlockData data = block.getState().getBlockData();
|
||||
if (data instanceof WallSign) {
|
||||
facing = ((Directional) data).getFacing();
|
||||
} else {
|
||||
facing = ((Rotatable) data).getRotation();
|
||||
if (!(data instanceof WallSign wallSign)) {
|
||||
return;
|
||||
}
|
||||
facing = wallSign.getFacing();
|
||||
|
||||
Block relativeBlock = block.getRelative(facing.getOppositeFace());
|
||||
PlayerShop shop = shopHandler.getShop(relativeBlock.getLocation());
|
||||
|
||||
Reference in New Issue
Block a user