Hello, i coding some sort of event system but i'm stuck with problem how to reset variable {cc.event.%player%} becouse if player want to create event and past event is not removed correctly he can't create another and i'm also stuck with removing world files when player close event. when player close event only files is being rmeoved is levle.dat uid.dat and sesion.lock folders data playerdata and region with files in this folder is not removed also a world folder, sooo here is my code:
This is a very very beta of events so a lot of bugs need to be fixed.
Thanks in advance.
[doublepost=1500313135,1500299165][/doublepost]BUMP
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"
create folder "plugins/CamCraftCore/CCEvents/%player%'s Event-1"
load world "plugins/CamCraftCore/CCEvents/%player%'s Event-1"
wait 20 seconds
teleport player to spawn of "plugins/CamCraftCore/CCEvents/%player%'s Event-1"
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 /eventconfirm:
permission: cc.command.eventconfirm
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" to "plugins/CamCraftCore/CCEvents/%player%'s Event-1/"
load world "plugins/CamCraftCore/CCEvents/%player%' Event-1"
set {event.%player%'s Event-1} to "true"
wait 20 seconds
else:
send "%{Prefix}% &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":
teleport player to spawn of "world"
make player execute command "/spawn"
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 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/session.lock"
delete folder "plugins/CamCraftCore/CCEvents/%player%'s Event-1"
This is a very very beta of events so a lot of bugs need to be fixed.
Thanks in advance.
[doublepost=1500313135,1500299165][/doublepost]BUMP