• Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

VojaFTW

Member
Jun 10, 2017
42
2
0
I use this code to close my event but its not teleport player to spawn and idk if check for players on a list is ok. and also it doesn't remove full event folder only folders is still in %player%'s event-1 is data and region idk why is that happening other files from folder is removed just fine.

code_language.skript:
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 player is in list {playerlist::*}
                if player is in list {hosterlist::*}
                    skellett teleport all players to world "./world" 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 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%}
        clear {playerlist::*}
        clear {hosterlist::*}
 
Uhm what?




did you maybe make a mistake here?

mistake like??? and before lists and other things tp is working fine but i need lists or groups to store players and event hoster soo maybe if player is in list is error idk and also whyis not removing data and region folder from player's event-1 folder and also folder with all world files???
 
Last edited by a moderator:
uhm im think you want this methode:

code_language.skript:
set {_w} to yaml value "Event-1" from file "plugins/CamCraftCore/CCEvents/%player%'s.yml"
#then
loop-player's world is "%{_w}%":
 
uhm im think you want this methode:

code_language.skript:
set {_w} to yaml value "Event-1" from file "plugins/CamCraftCore/CCEvents/%player%'s.yml"
#then
loop-player's world is "%{_w}%":

I can try that is creating file with value event-1 but i need to world name is %player%'s Event-1 but ok i just can remove that check and see how is working and how can i fix removing world i don't get removed data and region in folder ex VojaFTW_'s Event-1 and i mean is error skellett teleport all players to world "world" spawn maybe can't be used all players using skellett teleportation but also i tryed with skript teleportation (teleport all players to spawn of "world") but doesn't work.
 
Last edited by a moderator:
Status
Not open for further replies.