mirror of
https://github.com/ChestShop-authors/ChestShop-3.git
synced 2024-11-23 02:25:25 +01:00
Fix sign sticker on 1.14+
This commit is contained in:
parent
8c1c80e138
commit
d1f6b1616b
@ -51,12 +51,17 @@ public class SignSticker implements Listener {
|
||||
return;
|
||||
}
|
||||
|
||||
int index = signBlock.getType().name().indexOf("SIGN");
|
||||
if (index < 0) {
|
||||
return;
|
||||
}
|
||||
Material newMaterial = Material.valueOf(signBlock.getType().name().substring(0, index) + "WALL_SIGN");
|
||||
|
||||
signBlock.setType(Material.WALL_SIGN);
|
||||
signBlock.setType(newMaterial);
|
||||
|
||||
org.bukkit.block.Sign sign = (org.bukkit.block.Sign) signBlock.getState();
|
||||
|
||||
WallSign signMaterial = (WallSign) Bukkit.createBlockData(Material.WALL_SIGN);
|
||||
WallSign signMaterial = (WallSign) Bukkit.createBlockData(newMaterial);
|
||||
signMaterial.setFacing(shopBlockFace.getOppositeFace());
|
||||
sign.setBlockData(signMaterial);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user