2023-01-07 19:34:09 +00:00
|
|
|
variables:
|
|
|
|
{sgchest} = false
|
2023-01-07 20:55:46 +00:00
|
|
|
{chestchecker} = false
|
2023-01-07 19:34:09 +00:00
|
|
|
|
|
|
|
command /sgchest [<text>]:
|
|
|
|
permission: op
|
|
|
|
trigger:
|
|
|
|
if arg-1 is not set:
|
|
|
|
send "&c/sgchest on &7- zapne loot chestiek" to player
|
|
|
|
send "&c/sgchest off &7- vypne loot chestiek" to player
|
|
|
|
if arg-1 is "on":
|
|
|
|
set {sgchest} to true
|
|
|
|
if arg-1 is "off":
|
|
|
|
set {sgchest} to false
|
|
|
|
|
2023-01-07 20:55:46 +00:00
|
|
|
on right click:
|
|
|
|
if clicked block is chest:
|
|
|
|
set {chestchecker} to true
|
|
|
|
set {chest_cords} to clicked block
|
2023-01-07 19:34:09 +00:00
|
|
|
|
2023-01-07 20:55:46 +00:00
|
|
|
on inventory close:
|
|
|
|
if {chestchecker} is true:
|
|
|
|
set {chestchecker} to false
|
|
|
|
break the block at {chest_cords}
|