I have a parkour skript, and I try to create a GUI menu for all the arenas has been created.
But when i try to click on an item in the GUI It's doesn't recognize the click event and nothing happens... even the message doesn't show up, But when i click on an empty slot it's works the (message "%loop-value%") shows up...
Code:
But when i try to click on an item in the GUI It's doesn't recognize the click event and nothing happens... even the message doesn't show up, But when i click on an empty slot it's works the (message "%loop-value%") shows up...
Code:
code_language.skript:
command /gui:
trigger:
if size of {parkourarena::*} = 0:
send "{@park}Empty."
else:
open chest with 6 rows named "&8Arenas" to player
clear {parkarena.amount}
loop {parkourarena::*}:
add 1 to {parkarena.amount}
format slot {parkarena.amount}-1 of player with stone named "%loop-value%" with lore "&e&oClick to join." to be unstealable
on inventory click:
loop {parkourarena::*}:
message "%loop-value%"
if name of clicked item is equal to loop-value:
execute player command "/parkour join loop-value"