on script unload: send "[xSkyWars] Disabling xSkyWars v%{version}%" to console on script load: set {version} to "1.0" send "[xSkyWars] Enabling xSkyWars v%{version}%" to console set {_version.web::*} to contents from url "%uncolored ""https://code.skript.pl/3k2fiiho/raw""%" wait 2 ticks if yaml value "notifyUpdates" from "config" is true: if {_version} is not {_version.web::1}: send "[xSkyWars] There is a new update, download it from discord! https://discord.gg/rBnTpgrCTg" to console on load: if file "plugins/Skywars/config.yml" doesn't exist: wait 4 ticks send "[xSkyWars] Creating config files..." to console load yaml "plugins/Skywars/config.yml" as "config" set yaml value "notifyUpdates" from "config" to true set the comments of yaml node "notifyUpdates" from "config" to "Should script informate about new updates" set yaml value "setupMode" from "config" to "MULTIARENA" set the comments of yaml node "setupMode" from "config" to "MULTIARENA - All areas have been randomly choosed" and "SINGLEARENA - Only one selected arena can be played" set yaml value "lobbyServer" from "config" to true set yaml value "lobbyServer.name" from "config" to "Lobby" set the comments of yaml node "lobbyServer" from "config" to "Lobby server for starting games" set yaml value "ItemsInChest" from "config" to 5 set the comments of yaml node "ItemsInChest" from "config" to "Items in one chest, randomly choosed" set yaml value "ChestRefillTime" from "config" to 150 set the comments of yaml node "ChestRefillTime" from "config" to "Time bettwen chest refill items" set yaml value "AreaEndTime" from "config" to 600 set the comments of yaml node "AreaEndTime" from "config" to "After that time area will end, and noone will win" set yaml value "AreaLastBattleTime" from "config" to 480 set the comments of yaml node "AreaLastBattleTime" from "config" to "After that time all player will be teleported" and "to main island and they will fight last time" set yaml value "TeamChat" from "config" to true set the comments of yaml node "TeamChat" from "config" to "Should player talk only to their teammates?" and "Thay can talk to everyone with next option" set yaml value "GlobalChatPrefix" from "config" to "!" set the comments of yaml node "GlobalChatPrefix" from "config" to "When player will type this before message, they will talk to everyone in area" set yaml value "StartGame.Chat" from "config" to true set yaml value "StartGame.Title" from "config" to true set the comments of yaml node "StartGame" from "config" to "Should messages be displayed on chat/title after game start" set yaml value "CountingToStart" from "config" to true set yaml value "CountingToStart.seconds" from "config" to 10 set yaml value "LoseHungerInArea" from "config" to false set the comments of yaml node "LoseHungerInArea" from "config" to "Should players lose hunger while game?" set yaml list "AllowedCommands" from "config" to "msg" and "r" and "reply" and "help" and "helpop" and "sw" and "skywars" and "leave" set the comments of yaml node "AllowedCommands" from "config" to "Commands that are allowed on area" set yaml value "Spectating" from "config" to true set the comments of yaml node "Spectating" from "config" to "Allow players to spectate other areas?" save yaml "config" load yaml "plugins/Skywars/config.yml" as "config" if file "plugins/Skywars/kits.yml" doesn't exist: if file "plugins/Skywars/scoreboard.yml" doesn't exist: if file "plugins/Skywars/data.yml" doesn't exist: if file "plugins/Skywars/messages.yml" doesn't exist: if file "plugins/Skywars/arenas.yml" doesn't exist: if file "plugins/Skywars/guis.yml" doesn't exist: