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: wait 4 ticks send "[xSkyWars] Creating kits files..." to console load yaml "plugins/Skywars/kits.yml" as "kits" set yaml value "knight.enabled" from "kits" to true set yaml value "knight.name" from "kits" to "&7ᴋɴɪɢʜᴛ" set yaml value "knight.guiItem" from "kits" to "iron chestplate" set yaml value "knight.cost" from "kits" to 1000 set yaml value "knight.rarity" from "kits" to "epic" set yaml list "knight.items" from "kits" to "stone sword" and "2 golden apples" and "10 cobblestones" set yaml value "knight.permission" from "kits" to "skywars.kit.knight" set yaml value "knight.upgradeable" from "kits" to true set yaml value "knight.poz.1.cost" from "kits" to 200 set yaml value "knight.poz.1.items" from "kits" to "1 golden apple" and "10 cobblestones" set yaml value "knight.poz.2.cost" from "kits" to 300 set yaml value "knight.poz.2.items" from "kits" to "1 golden apple" and "egg" set yaml value "knight.poz.3.cost" from "kits" to 400 set yaml value "knight.poz.3.items" from "kits" to "iron sword" and "iron axe" set yaml value "archer.enabled" from "kits" to true set yaml value "archer.name" from "kits" to "&aᴀʀᴄʜᴇʀ" set yaml value "archer.guiItem" from "kits" to "bow" set yaml value "archer.cost" from "kits" to 1500 set yaml value "archer.rarity" from "kits" to "rare" set yaml list "archer.items" from "kits" to "bow" and "3 arrows" set yaml value "archer.permission" from "kits" to "skywars.kit.archer" set yaml value "archer.upgradeable" from "kits" to true set yaml value "archer.poz.1.cost" from "kits" to 250 set yaml value "archer.poz.1.items" from "kits" to "1 golden apple" and "20 cobblestones" set yaml value "archer.poz.2.cost" from "kits" to 350 set yaml value "archer.poz.2.items" from "kits" to "10 arrows" and "egg" set yaml value "archer.poz.3.cost" from "kits" to 450 set yaml value "archer.poz.3.items" from "kits" to "iron pickaxe" and "3 eggs" set yaml value "snowman.enabled" from "kits" to true set yaml value "snowman.name" from "kits" to "&fsɴᴏᴡᴍᴀɴ" set yaml value "snowman.guiItem" from "kits" to "snowball" set yaml value "snowman.cost" from "kits" to 1000 set yaml value "snowman.rarity" from "kits" to "common" set yaml list "snowman.items" from "kits" to "5 snowballs" set yaml value "snowman.permission" from "kits" to "skywars.kit.snowman" set yaml value "snowman.upgradeable" from "kits" to true set yaml value "snowman.poz.1.cost" from "kits" to 250 set yaml value "snowman.poz.1.items" from "kits" to "1 golden apple" and "20 cobblestones" set yaml value "snowman.poz.2.cost" from "kits" to 350 set yaml value "snowman.poz.2.items" from "kits" to "5 snowball" and "iron sword" set yaml value "snowman.poz.3.cost" from "kits" to 450 set yaml value "snowman.poz.3.items" from "kits" to "iron pickaxe" and "water bucket" set yaml value "enderman.enabled" from "kits" to true set yaml value "enderman.name" from "kits" to "&3ᴇɴᴅᴇʀᴍᴀɴ" set yaml value "enderman.guiItem" from "kits" to "ender pearl" set yaml value "enderman.cost" from "kits" to 5000 set yaml value "enderman.rarity" from "kits" to "mythical" set yaml list "enderman.items" from "kits" to "ender pearl" set yaml value "enderman.permission" from "kits" to "skywars.kit.enderman" set yaml value "enderman.upgradeable" from "kits" to true set yaml value "enderman.poz.1.cost" from "kits" to 500 set yaml value "enderman.poz.1.items" from "kits" to "none" set yaml value "enderman.poz.2.cost" from "kits" to 700 set yaml value "enderman.poz.2.items" from "kits" to "diamond chestplate" set yaml value "enderman.poz.3.cost" from "kits" to 900 set yaml value "enderman.poz.3.items" from "kits" to "ender pearl" and "diamond sword" set yaml value "champion.enabled" from "kits" to true set yaml value "champion.name" from "kits" to "&6ᴄʜᴀᴍᴘɪᴏɴ" set yaml value "champion.guiItem" from "kits" to "yellow candle" set yaml value "champion.cost" from "kits" to 7500 set yaml value "champion.rarity" from "kits" to "legendary" set yaml list "champion.items" from "kits" to "enchanted golden apple" and "diamond sword" and "ender pearl" and "5 obsidians" set yaml value "champion.permission" from "kits" to "skywars.kit.champion" set yaml value "champion.upgradeable" from "kits" to true set yaml value "champion.poz.1.cost" from "kits" to 1000 set yaml value "champion.poz.1.items" from "kits" to "diamond helmet" set yaml value "champion.poz.2.cost" from "kits" to 1500 set yaml value "champion.poz.2.items" from "kits" to "diamond chestplate" set yaml value "champion.poz.3.cost" from "kits" to 2000 set yaml value "champion.poz.3.items" from "kits" to "diamond leggings" and "diamond boots" save yaml "kits" load yaml "plugins/Skywars/kits.yml" as "kits" if file "plugins/Skywars/scoreboard.yml" doesn't exist: wait 4 ticks send "[xSkyWars] Creating scoreboard file..." to console load yaml "plugins/Skywars/scoreboard.yml" as "sb" set the header of "sb" to "Scoreboards config!" and "Avaible placeholders: , , , , , , , , , , , , ,