From 7ff628146846dad4af39b2eefabfb3737a5c7e25 Mon Sep 17 00:00:00 2001 From: Nexus Date: Sat, 7 Jan 2023 20:55:46 +0000 Subject: [PATCH] =?UTF-8?q?Nahr=C3=A1t=20soubory=20do=20=E2=80=9E=E2=80=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sgchest.sk | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/sgchest.sk b/sgchest.sk index 74e120c..b86d91d 100644 --- a/sgchest.sk +++ b/sgchest.sk @@ -1,5 +1,6 @@ variables: {sgchest} = false + {chestchecker} = false command /sgchest []: permission: op @@ -12,11 +13,12 @@ command /sgchest []: if arg-1 is "off": set {sgchest} to false -on right click on chest: - if {sgchest} = true: - cancel event - wait 1 tick - break the block - else if {sgchest} = false: - stop +on right click: + if clicked block is chest: + set {chestchecker} to true + set {chest_cords} to clicked block +on inventory close: + if {chestchecker} is true: + set {chestchecker} to false + break the block at {chest_cords} \ No newline at end of file