From 3ef4edd668d4cbc3c193d6b400c89347031509ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hakan=20Karg=C4=B1n?= Date: Thu, 10 Aug 2023 12:53:03 +0300 Subject: [PATCH] fix sign gui closing issue in 1.20 --- .../com/hakan/core/ui/sign/versions/SignGui_v1_20_R1.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hCore-bukkit/nms/v1_20_R1/src/main/java/com/hakan/core/ui/sign/versions/SignGui_v1_20_R1.java b/hCore-bukkit/nms/v1_20_R1/src/main/java/com/hakan/core/ui/sign/versions/SignGui_v1_20_R1.java index 02eef3a8..841bb949 100644 --- a/hCore-bukkit/nms/v1_20_R1/src/main/java/com/hakan/core/ui/sign/versions/SignGui_v1_20_R1.java +++ b/hCore-bukkit/nms/v1_20_R1/src/main/java/com/hakan/core/ui/sign/versions/SignGui_v1_20_R1.java @@ -39,15 +39,15 @@ private SignGui_v1_20_R1(@Nonnull Player player, @Override public SignGui open() { Location location = super.player.getLocation(); - BlockPosition blockPosition = new BlockPosition(location.getBlockX(), LOWEST_Y_AXIS + 1, location.getBlockZ()); + BlockPosition blockPosition = new BlockPosition(location.getBlockX(), location.getBlockY() + 3, location.getBlockZ()); IBlockData data = CraftMagicNumbers.getBlock(super.type.asMaterial()).n(); HCore.sendPacket(super.player, new PacketPlayOutBlockChange(blockPosition, data)); TileEntitySign sign = new TileEntitySign(blockPosition, null); SignText signText = sign.a(true); - for (int i = 0; i < lines.length; i++) - signText = signText.a(i, IChatBaseComponent.a(lines[i])); + for (int i = 0; i < super.lines.length; i++) + signText = signText.a(i, IChatBaseComponent.a(super.lines[i])); sign.a(signText, true); HCore.sendPacket(super.player, sign.j());