I am making this lava rising minigame, and im trying to make it so that a player does not get the kit again if he reconnects to the server
I am having issues at checking if the player is not contained in the list {hasbeenhere::*}
I am having issues at checking if the player is not contained in the list {hasbeenhere::*}
Code:
on join:
set join message to "&7[&a+&7] %player%"
wait 5 ticks
if {started} is true:
if {isLavaRising} is true:
wait 1 tick
make console execute command "/mvtp %player% lava"
wait 2 tick
set gamemode of player to spectator
clear player's inventory
wait 2 tick
send "&eYou joined late."
send "&aBut dont worry, more events are starting."
else if {isLavaRising} is false:
wait 1 tick
make console execute command "/mvtp %player% lava"
set gamemode of player to survival
loop {hasbeenhere::*}:
broadcast "%loop-value%"
if loop-value != player:
clear player's inventory
kit(player)
send "&eYou joined late but you can still play!"
add player to {hasbeenhere::*}
add player to {alive::*}
else if {started} is false:
make console execute command "/mvtp %player% world"
clear player's inventory