so i made a gui to teleport players close and etc but i cant put the gray stained glass pane in the slots this is the code and dont change the setcratespawn:
command /setcratesspawn:
trigger:
set {_pitch} to player's pitch
set {_yaw} to player's yaw
set {cratesteleport} to location at player
set {cratesteleport}'s pitch to {_pitch}
set {cratesteleport}'s yaw to {_yaw}
send "&4&lSpawn has been set to %{cratesteleport}% to player"
variables:
{frame} = gray stained glass pane
command /menu:
trigger:
set metadata tag "gui" of player to chest inventory with 3 rows named "&4&lMenu"
set slot 0 and 1 and 2 and 3 and 4 and 5 and 6 and 7 and 8 and 9 and 17 and 18 and 19 and 20 and 21 and 23 and 24 and 25 and 26 and 27 of player with {frame} named "&6"
set slot 11 of metadata tag "gui" of player to Shulker Box named "&2&lCrates" with lore "&4&lClick on me to teleport to the &2&lCrates"
set slot 22 of metadata tag "gui" of player to barrier named "&4&lClose"
open (metadata tag "gui" of player) to player
on inventory click:
if event-inventory = (metadata tag "gui" of player):
cancel event
if index of event-slot is 11:
teleport player to {cratesteleport}
on inventory click:
if event-inventory = (metadata tag "gui" of player):
cancel event
if index of event-slot is 22:
close inventory
command /setcratesspawn:
trigger:
set {_pitch} to player's pitch
set {_yaw} to player's yaw
set {cratesteleport} to location at player
set {cratesteleport}'s pitch to {_pitch}
set {cratesteleport}'s yaw to {_yaw}
send "&4&lSpawn has been set to %{cratesteleport}% to player"
variables:
{frame} = gray stained glass pane
command /menu:
trigger:
set metadata tag "gui" of player to chest inventory with 3 rows named "&4&lMenu"
set slot 0 and 1 and 2 and 3 and 4 and 5 and 6 and 7 and 8 and 9 and 17 and 18 and 19 and 20 and 21 and 23 and 24 and 25 and 26 and 27 of player with {frame} named "&6"
set slot 11 of metadata tag "gui" of player to Shulker Box named "&2&lCrates" with lore "&4&lClick on me to teleport to the &2&lCrates"
set slot 22 of metadata tag "gui" of player to barrier named "&4&lClose"
open (metadata tag "gui" of player) to player
on inventory click:
if event-inventory = (metadata tag "gui" of player):
cancel event
if index of event-slot is 11:
teleport player to {cratesteleport}
on inventory click:
if event-inventory = (metadata tag "gui" of player):
cancel event
if index of event-slot is 22:
close inventory