Hello, if you reading this now you are here to help me make a list and in that list to store all player joined a event.
So here is me code:
INFO: In code i don't implement a feature of list soo i need a way to make it.
Thanks in advance.
So here is me code:
INFO: In code i don't implement a feature of list soo i need a way to make it.
code_language.skript:
command /hostevent:
permission: cc.command.hostevent
permission message: &cInvalid permission, sorry.
trigger:
if {cc.event.%player%} is not set:
send "&0[&3&l%{ePrefix}%&0] &3%player%'s Event-1 successfully created. You will be sent to it shortly."
send "&0[&3&l%{ePrefix}%&0] &3If you haven't been send in 20 seconds, type /mv tp %player%'s Event-1"
copy dir "plugins/CamCraftCore/CCEvents/eventmap/map1" to "plugins/CamCraftCore/CCEvents/%player%'s Event-1/"
wait 10 ticks
load world "plugins/CamCraftCore/CCEvents/%player%'s Event-1"
wait 20 seconds
skellett teleport player to world "plugins/CamCraftCore/CCEvents/%player%'s Event-1" spawn
set {cc.event.join.%player%} to true
else:
send "&0[&3&l%{ePrefix}%&0] &3Your event is still being created or already exists. If you haven't been send in 20 seconds, type /mv tp %player%'s Event-1."
command /closeevent:
permission: cc.command.eventclose
permission message: &cInvalid permission, sorry.
trigger:
loop all players:
loop-player's world is "plugins/CamCraftCore/CCEvents/%player%'s Event-1"
if {cc.event.join.%player%} is true
teleport all players to spawn of "world"
unload world "plugins/CamCraftCore/CCEvents/%player%'s Event-1"
wait 2 seconds
delete folder "plugins/CamCraftCore/CCEvents/%player%'s Event-1/data"
delete folder "plugins/CamCraftCore/CCEvents/%player%'s Event-1/region"
delete folder "plugins/CamCraftCore/CCEvents/%player%'s Event-1/playerdata"
wait 2 ticks
delete file "plugins/CamCraftCore/CCEvents/%player%'s Event-1/level.dat"
delete file "plugins/CamCraftCore/CCEvents/%player%'s Event-1/uid.dat"
delete file "plugins/CamCraftCore/CCEvents/%player%'s Event-1/level.dat_old"
wait 2 ticks
delete file "plugins/CamCraftCore/CCEvents/%player%'s Event-1/session.lock"
delete folder "plugins/CamCraftCore/CCEvents/%player%'s Event-1"
wait 2 ticks
message "&0[&3&l%{eprefix}%&0] &3Successfully removed your event."
delete {cc.event.%player%}
delete {cc.event.join.%player%}
Thanks in advance.