So I want to make a Format gui with on and off but there is always this error message "end crystal named "&a&lTest" is not an nbt compound" Can somebody fix that?
Code:
function uGUI(p: player):
set {_p}'s metadata tag "uGUI" to chest inventory with 5 rows named "TEST"
set slot 30 of {_p}'s metadata tag "uGUI" to End Crystal named "&a&lTest" with lore "&fClick to change <##ff0000>OFF"
open {_p}'s metadata tag "uGUI" to {_p}
command /test:
trigger:
uGUI(player)
on inventory click:
if event-inventory = player's metadata tag "uGUI":
cancel event
if index of event-slot = 30:
format slot 30 of player with End Crystal named "&a&lTest" with lore "&fClick to change &aON"