Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- options:
- VersionID: 3.6
- aliases:
- brojo = 425:1
- bazul = 425:4
- redglass = 95:14
- blueglass = 95:11
- on load:
- if text from "http://pastebin.com/raw/7B4aA8fD" is not "{@VersionID}":
- send "%{bw.config::prefix}% &aNew version available!" to console
- on join:
- if player has permission "blockwars.admin":
- if text from "http://pastebin.com/raw/7B4aA8fD" is not "{@VersionID}":
- send "%{bw.config::prefix}% &aNew version available!"
- on load:
- if existence of "plugins/BlockWars/version.txt" is false:
- wait 3 ticks
- create file "plugins/BlockWars/version.txt"
- set yaml value "version" from file "../../BlockWars/version.txt" to "{@VersionID}"
- else:
- set {_ver} to text from "http://pastebin.com/raw/7B4aA8fD"
- if {_ver} is set:
- set {_actual} to yaml value "version" from file "../../BlockWars/version.txt"
- if {_ver} is not {_actual}:
- delete file "plugins/BlockWars/config.yml"
- delete file "plugins/BlockWars/message.yml"
- delete file "plugins/BlockWars/sign.yml"
- delete file "plugins/BlockWars/kits.yml"
- delete file "plugins/BlockWars/rewards.yml"
- delete file "plugins/BlockWars/scoreboard.yml"
- delete file "plugins/BlockWars/version.txt"
- send "%{bw.config::prefix}% &aAll config files has bee updated! If no files generated use /blockwars reload." to console
- send "%{bw.config::prefix}% &aAll config files has bee updated! If no files generated use /blockwars reload." to all ops
- else:
- send "%{bw.config::prefix}% &cIt not has been possible to connect to internet!" to console
- send "%{bw.config::prefix}% &cIt not has been possible to connect to internet!" to all ops
- on load:
- if existence of "plugins/BlockWars/config.yml" is false:
- create file "plugins/BlockWars/config.yml"
- wf "## Block Wars MINIGAME - Configuration ##" to "plugins/BlockWars/config.yml"
- set yaml value "config.prefix" from file "../../BlockWars/config.yml" to "&7[&2BlockWars&7]"
- set yaml value "config.rebuild-map-delay" from file "../../BlockWars/config.yml" to "3 seconds"
- set yaml value "config.regeneration-effect" from file "../../BlockWars/config.yml" to "true"
- set yaml value "config.holo-stats" from file "../../BlockWars/config.yml" to "&a<player> &e&lBlockWars &astatistics//&2Wins&7: &f<wins>//&2Kills&7: &f<kills>//&2Deaths&7: &f<deaths>//&2Flags captured&7: &f<flags-captured>//&2Games played&7: &f<games-played>//&2Arrow shot&7: &f<arrow-shot>//&2Arrow hit&7: &f<arrow-hit>//&2Blocks broken&7: &f<block-bloken>//&2Blocks placed&7: &f<block-placed>"
- set yaml value "config.defaults.default_min_players" from file "../../BlockWars/config.yml" to "4"
- set yaml value "config.defaults.default_players_per_team" from file "../../BlockWars/config.yml" to "6"
- set yaml value "config.commands.leave" from file "../../BlockWars/config.yml" to "leave"
- set yaml value "config.countdown.lobby" from file "../../BlockWars/config.yml" to "20"
- set yaml value "config.chat.lobby" from file "../../BlockWars/config.yml" to "&7<player>: <msg>"
- set yaml value "config.chat.team" from file "../../BlockWars/config.yml" to "&b[Team] &e<player>&f: &7<msg>"
- set yaml value "config.chat.global" from file "../../BlockWars/config.yml" to "&4[Global] &e<player>&f: &7<msg>"
- set yaml value "config.kits.title" from file "../../BlockWars/config.yml" to "&8Kit Selection"
- set yaml value "config.kits.villager-name" from file "../../BlockWars/config.yml" to "&aKits"
- set yaml value "config.shop.title" from file "../../BlockWars/config.yml" to "&0BlockWars Shop"
- set yaml value "config.items.kits.id" from file "../../BlockWars/config.yml" to "339:0"
- set yaml value "config.items.kits.name" from file "../../BlockWars/config.yml" to "&aKit Selection"
- set yaml value "config.items.kits.slot" from file "../../BlockWars/config.yml" to "1"
- set yaml value "config.items.select-team.id" from file "../../BlockWars/config.yml" to "399:0"
- set yaml value "config.items.select-team.name" from file "../../BlockWars/config.yml" to "&aTeam Selection"
- set yaml value "config.items.select-team.slot" from file "../../BlockWars/config.yml" to "0"
- set yaml value "config.items.leave.id" from file "../../BlockWars/config.yml" to "331:0"
- set yaml value "config.items.leave.name" from file "../../BlockWars/config.yml" to "&cLeave the game"
- set yaml value "config.items.leave.slot" from file "../../BlockWars/config.yml" to "8"
- set {bw.config::prefix} to yaml value "config.prefix" from file "../../BlockWars/config.yml"
- set {bw.config::rebuild-map-delay} to yaml value "config.rebuild-map-delay" from file "../../BlockWars/config.yml"
- set {bw.config::rebuild-map-delay} to {bw.config::rebuild-map-delay} parsed as timespan
- set {bw.config::config::regeneration-effect} to yaml value "config.regeneration-effect" from file "../../BlockWars/config.yml"
- set {bw.config::hologram::stats-holo} to yaml value "config.holo-stats" from file "../../BlockWars/config.yml"
- set {bw.config::config::default_min_players} to yaml value "config.defaults.default_min_players" from file "../../BlockWars/config.yml"
- set {bw.config::config::default_min_players} to {bw.config::config::default_min_players} parsed as integer
- set {bw.config::config::default_players_per_team} to yaml value "config.defaults.default_players_per_team" from file "../../BlockWars/config.yml"
- set {bw.config::config::default_players_per_team} to {bw.config::config::default_players_per_team} parsed as integer
- set {bw.config::leave-cmd} to yaml value "config.commands.leave" from file "../../BlockWars/config.yml"
- set {bw.config::config::countdown} to yaml value "config.countdown.lobby" from file "../../BlockWars/config.yml"
- set {bw.config::config::countdown} to {bw.config::config::countdown} parsed as integer
- set {bw.config::chat::lobby-chat} to yaml value "config.chat.lobby" from file "../../BlockWars/config.yml"
- set {bw.config::chat::team-chat} to yaml value "config.chat.team" from file "../../BlockWars/config.yml"
- set {bw.config::chat::global-chat} to yaml value "config.chat.global" from file "../../BlockWars/config.yml"
- set {bw.config::kit::title-gui} to yaml value "config.kits.title" from file "../../BlockWars/config.yml"
- set {bw.config::kit::villager-name} to yaml value "config.kits.villager-name" from file "../../BlockWars/config.yml"
- set {bw.config::shop::shop-title-gui} to yaml value "config.shop.title" from file "../../BlockWars/config.yml"
- set {bw.config::item::kit-item-id} to yaml value "config.items.kits.id" from file "../../BlockWars/config.yml"
- set {bw.config::item::kit-item-id} to {bw.config::item::kit-item-id} parsed as item
- set {bw.config::item::kit-item-name} to yaml value "config.items.kits.name" from file "../../BlockWars/config.yml"
- set {bw.config::item::kit-item-slot} to yaml value "config.items.kits.slot" from file "../../BlockWars/config.yml"
- set {bw.config::item::kit-item-slot} to {bw.config::item::kit-item-slot} parsed as integer
- set {bw.config::item::team-item-id} to yaml value "config.items.select-team.id" from file "../../BlockWars/config.yml"
- set {bw.config::item::team-item-id} to {bw.config::item::team-item-id} parsed as item
- set {bw.config::item::team-item-name} to yaml value "config.items.select-team.name" from file "../../BlockWars/config.yml"
- set {bw.config::item::team-item-slot} to yaml value "config.items.select-team.slot" from file "../../BlockWars/config.yml"
- set {bw.config::item::team-item-slot} to {bw.config::item::team-item-slot} parsed as integer
- set {bw.config::item::leave-item-id} to yaml value "config.items.leave.id" from file "../../BlockWars/config.yml"
- set {bw.config::item::leave-item-id} to {bw.config::item::leave-item-id} parsed as item
- set {bw.config::item::leave-item-name} to yaml value "config.items.leave.name" from file "../../BlockWars/config.yml"
- set {bw.config::item::leave-item-slot} to yaml value "config.items.leave.slot" from file "../../BlockWars/config.yml"
- set {bw.config::item::leave-item-slot} to {bw.config::item::leave-item-slot} parsed as integer
- on load:
- if existence of "plugins/BlockWars/messages.yml" is false:
- create file "plugins/BlockWars/messages.yml"
- wf "## Block Wars MINIGAME - Messages ##" to "plugins/BlockWars/messages.yml"
- set yaml value "messages.error.no-permission" from file "../../BlockWars/messages.yml" to "&cYou do not have permission to do this!"
- set yaml value "messages.error.kit-no-permission" from file "../../BlockWars/messages.yml" to "&cYou do not have permission to select this kit!"
- set yaml value "messages.error.kit-not-bought" from file "../../BlockWars/messages.yml" to "&cYou have not bought this kit!"
- set yaml value "messages.error.no-money" from file "../../BlockWars/messages.yml" to "&cYou do not have enough money!"
- set yaml value "messages.error.no-ingame" from file "../../BlockWars/messages.yml" to "&cYou are not a game!"
- set yaml value "messages.error.ingame" from file "../../BlockWars/messages.yml" to "&cYou are in a game!"
- set yaml value "messages.error.full-game" from file "../../BlockWars/messages.yml" to "&cThis game is in progress!"
- set yaml value "messages.error.not-available" from file "../../BlockWars/messages.yml" to "&cThis game is not available!"
- set yaml value "messages.error.not-exist" from file "../../BlockWars/messages.yml" to "&cThis game does not exist!"
- set yaml value "messages.error.stop-arena" from file "../../BlockWars/messages.yml" to "&cThis play has been stopped!"
- set yaml value "messages.error.no-min-players" from file "../../BlockWars/messages.yml" to "&cIt is to finish the countdown because there are not enough players to start!"
- set yaml value "messages.error.no-build" from file "../../BlockWars/messages.yml" to "&cYou cannot build here!"
- set yaml value "messages.error.no-break" from file "../../BlockWars/messages.yml" to "&cYou can only break the blocks placed!"
- set yaml value "messages.error.capture-own-flag" from file "../../BlockWars/messages.yml" to "&cYou can not take the flag of your team!"
- set yaml value "messages.error.damage-own-team" from file "../../BlockWars/messages.yml" to "&cYou can not attack your own team!"
- set yaml value "messages.error.full-team" from file "../../BlockWars/messages.yml" to "&cYou cannot join this team because it is full!"
- set yaml value "messages.listener.join-broad" from file "../../BlockWars/messages.yml" to "&5<player> joined the game. <amount>/<max>"
- set yaml value "messages.listener.leave-broad-lobby" from file "../../BlockWars/messages.yml" to "&6<player> left the game. <amount>/<max>"
- set yaml value "messages.listener.leave-broad-ingame" from file "../../BlockWars/messages.yml" to "&6<player> &eleft the game!"
- set yaml value "messages.listener.leave-msg" from file "../../BlockWars/messages.yml" to "&fYou have abandoned the game!"
- set yaml value "messages.phase.phase-build" from file "../../BlockWars/messages.yml" to "&a&lBUILD"
- set yaml value "messages.phase.phase-fight" from file "../../BlockWars/messages.yml" to "&c&lFIGTH"
- set yaml value "messages.phase.phase-overtime" from file "../../BlockWars/messages.yml" to "&4&lOVERTIME"
- set yaml value "messages.game.countdown-msg" from file "../../BlockWars/messages.yml" to "&9The game starting in <time> seconds!"
- set yaml value "messages.game.toStart" from file "../../BlockWars/messages.yml" to "&6Game will start!"
- set yaml value "messages.game.jointeam-red" from file "../../BlockWars/messages.yml" to "&aJoined team &cRed&a!"
- set yaml value "messages.game.jointeam-blue" from file "../../BlockWars/messages.yml" to "&aJoined team &9Blue&a!"
- set yaml value "messages.game.phasestart-build" from file "../../BlockWars/messages.yml" to "&6Build blocks around your flag!"
- set yaml value "messages.game.phasestart-fight" from file "../../BlockWars/messages.yml" to "&6Capture de other teams flags!"
- set yaml value "messages.game.phasestart-overtime" from file "../../BlockWars/messages.yml" to "&cThe game is now in overtime! All blocks place have been removed."
- set yaml value "messages.game.flag-taken" from file "../../BlockWars/messages.yml" to "FLAG TAKEN//<player> &7has taken the <team> &7flag!"
- set yaml value "messages.game.flag-dropped" from file "../../BlockWars/messages.yml" to "FLAG DROPPED//<player> &7has dropped the <team> &7flag!"
- set yaml value "messages.game.flag-captured" from file "../../BlockWars/messages.yml" to "FLAG CAPTURED//<player> &7has captured the <team> &7flag!"
- set yaml value "messages.pvp.kill-player" from file "../../BlockWars/messages.yml" to "<victim> &ewas killed by <attacker>&e!"
- set yaml value "messages.pvp.death-player" from file "../../BlockWars/messages.yml" to "<victim> &edied!"
- set yaml value "messages.pvp.respawn-screen" from file "../../BlockWars/messages.yml" to "&eRespawning in &6<time> &eseconds"
- set yaml value "messages.kit.kit-purchased" from file "../../BlockWars/messages.yml" to "&aPurchased <kit>!"
- set yaml value "messages.kit.kit-already-purchased" from file "../../BlockWars/messages.yml" to "&cYou have already purchased this kit!"
- set yaml value "messages.kit.kit-select-lobby" from file "../../BlockWars/messages.yml" to "&aYou have selected the kit <kit>!"
- set yaml value "messages.kit.kit-select-ingame" from file "../../BlockWars/messages.yml" to "&6Your kit will be delivered to respawn!"
- set yaml value "messages.win.red-win" from file "../../BlockWars/messages.yml" to "&cRed team &awon the game!"
- set yaml value "messages.win.blue-win" from file "../../BlockWars/messages.yml" to "&9Blue team &awon the game!"
- set yaml value "messages.win.tie-win" from file "../../BlockWars/messages.yml" to "&aThe game has ended in a tie!"
- set {bw.config-msg::kit::kit-purchased} to yaml value "messages.kit.kit-purchased" from file "../../BlockWars/messages.yml"
- set {bw.config-msg::kit::kit-already-purchased} to yaml value "messages.kit.kit-already-purchased" from file "../../BlockWars/messages.yml"
- set {bw.config-msg::kit::kit-select-lobby} to yaml value "messages.kit.kit-select-lobby" from file "../../BlockWars/messages.yml"
- set {bw.config-msg::kit::kit-select-ingame} to yaml value "messages.kit.kit-select-ingame" from file "../../BlockWars/messages.yml"
- set {bw.config-msg::win::red-win} to yaml value "messages.win.red-win" from file "../../BlockWars/messages.yml"
- set {bw.config-msg::win::blue-win} to yaml value "messages.win.blue-win" from file "../../BlockWars/messages.yml"
- set {bw.config-msg::win::tie-game} to yaml value "messages.win.tie-win" from file "../../BlockWars/messages.yml"
- set {bw.config-msg::pvp::kill-player} to yaml value "messages.pvp.kill-player" from file "../../BlockWars/messages.yml"
- set {bw.config-msg::pvp::death-player} to yaml value "messages.pvp.death-player" from file "../../BlockWars/messages.yml"
- set {bw.config-msg::pvp::respawn-screen} to yaml value "messages.pvp.respawn-screen" from file "../../BlockWars/messages.yml"
- set {bw.config-msg::phase::phase-build} to yaml value "messages.phase.phase-build" from file "../../BlockWars/messages.yml"
- set {bw.config-msg::phase::phase-figth} to yaml value "messages.phase.phase-fight" from file "../../BlockWars/messages.yml"
- set {bw.config-msg::phase::phase-overtime} to yaml value "messages.phase.phase-overtime" from file "../../BlockWars/messages.yml"
- set {bw.config-msg::game::countdown-msg} to yaml value "messages.game.countdown-msg" from file "../../BlockWars/messages.yml"
- set {bw.config-msg::game::tostart} to yaml value "messages.game.toStart" from file "../../BlockWars/messages.yml"
- set {bw.config-msg::game::jointeam-red} to yaml value "messages.game.jointeam-red" from file "../../BlockWars/messages.yml"
- set {bw.config-msg::game::jointeam-blue} to yaml value "messages.game.jointeam-blue" from file "../../BlockWars/messages.yml"
- set {bw.config-msg::game::phasestart-build} to yaml value "messages.game.phasestart-build" from file "../../BlockWars/messages.yml"
- set {bw.config-msg::game::phasestart-figth} to yaml value "messages.game.phasestart-fight" from file "../../BlockWars/messages.yml"
- set {bw.config-msg::game::phasestart-overtime} to yaml value "messages.game.phasestart-overtime" from file "../../BlockWars/messages.yml"
- set {bw.config-msg::game::flag-taken} to yaml value "messages.game.flag-taken" from file "../../BlockWars/messages.yml"
- set {bw.config-msg::game::flag-dropped} to yaml value "messages.game.flag-dropped" from file "../../BlockWars/messages.yml"
- set {bw.config-msg::game::flag-captured} to yaml value "messages.game.flag-captured" from file "../../BlockWars/messages.yml"
- set {bw.config-msg::listener::join-broad} to yaml value "messages.listener.join-broad" from file "../../BlockWars/messages.yml"
- set {bw.config-msg::listener::leave-broad-lobby} to yaml value "messages.listener.leave-broad-lobby" from file "../../BlockWars/messages.yml"
- set {bw.config-msg::listener::leave-broad-ingame} to yaml value "messages.listener.leave-broad-ingame" from file "../../BlockWars/messages.yml"
- set {bw.config-msg::listener::leave-msg} to yaml value "messages.listener.leave-msg" from file "../../BlockWars/messages.yml"
- set {bw.config-msg::error::no-permission} to yaml value "messages.error.no-permission" from file "../../BlockWars/messages.yml"
- set {bw.config-msg::error::kit-no-permission} to yaml value "messages.error.kit-no-permission" from file "../../BlockWars/messages.yml"
- set {bw.config-msg::error::no-ingame} to yaml value "messages.error.no-ingame" from file "../../BlockWars/messages.yml"
- set {bw.config-msg::error::ingame} to yaml value "messages.error.ingame" from file "../../BlockWars/messages.yml"
- set {bw.config-msg::error::full-game} to yaml value "messages.error.full-game" from file "../../BlockWars/messages.yml"
- set {bw.config-msg::error::not-available} to yaml value "messages.error.not-available" from file "../../BlockWars/messages.yml"
- set {bw.config-msg::error::not-exist} to yaml value "messages.error.not-exist" from file "../../BlockWars/messages.yml"
- set {bw.config-msg::error::stop-arena} to yaml value "messages.error.stop-arena" from file "../../BlockWars/messages.yml"
- set {bw.config-msg::error::no-min-players} to yaml value "messages.error.no-min-players" from file "../../BlockWars/messages.yml"
- set {bw.config-msg::error::no-build} to yaml value "messages.error.no-build" from file "../../BlockWars/messages.yml"
- set {bw.config-msg::error::no-break} to yaml value "messages.error.no-break" from file "../../BlockWars/messages.yml"
- set {bw.config-msg::error::kit-not-bought} to yaml value "messages.error.kit-not-bought" from file "../../BlockWars/messages.yml"
- set {bw.config-msg::error::no-money} to yaml value "messages.error.no-money" from file "../../BlockWars/messages.yml"
- set {bw.config-msg::error::capture-own-flag} to yaml value "messages.error.capture-own-flag" from file "../../BlockWars/messages.yml"
- set {bw.config-msg::error::damage-own-team} to yaml value "messages.error.damage-own-team" from file "../../BlockWars/messages.yml"
- set {bw.config-msg::error::full-team} to yaml value "messages.error.full-team" from file "../../BlockWars/messages.yml"
- on load:
- if existence of "plugins/BlockWars/sign.yml" is false:
- create file "plugins/BlockWars/sign.yml"
- wf "## BlockWars MINIGAME - Sign ##" to "plugins/BlockWars/sign.yml"
- set yaml value "sign.lines.header" from file "../../BlockWars/sign.yml" to "&0&lBlockWars"
- set yaml value "sign.status.waiting" from file "../../BlockWars/sign.yml" to "&aWaiting"
- set yaml value "sign.status.starting" from file "../../BlockWars/sign.yml" to "&6Starting"
- set yaml value "sign.status.ingame" from file "../../BlockWars/sign.yml" to "&cIngame"
- set yaml value "sign.status.rebuild" from file "../../BlockWars/sign.yml" to "&5Rebuild"
- set yaml value "sign.status.notready" from file "../../BlockWars/sign.yml" to "&4NotReady"
- set yaml value "sign.block-change.enable" from file "../../BlockWars/sign.yml" to "true"
- set yaml value "sign.block-change.blocks.waiting" from file "../../BlockWars/sign.yml" to "95:5"
- set yaml value "sign.block-change.blocks.starting" from file "../../BlockWars/sign.yml" to "95:4"
- set yaml value "sign.block-change.blocks.ingame" from file "../../BlockWars/sign.yml" to "95:14"
- set yaml value "sign.block-change.blocks.rebuild" from file "../../BlockWars/sign.yml" to "95:10"
- set yaml value "sign.block-change.blocks.notready" from file "../../BlockWars/sign.yml" to "95:15"
- set {bw.config::sign::header} to yaml value "sign.lines.header" from file "../../BlockWars/sign.yml"
- set {bw.config::sign::waiting} to yaml value "sign.status.waiting" from file "../../BlockWars/sign.yml"
- set {bw.config::sign::starting} to yaml value "sign.status.starting" from file "../../BlockWars/sign.yml"
- set {bw.config::sign::gingame} to yaml value "sign.status.ingame" from file "../../BlockWars/sign.yml"
- set {bw.config::sign::rebuild} to yaml value "sign.status.rebuild" from file "../../BlockWars/sign.yml"
- set {bw.config::sign::notready} to yaml value "sign.status.notready" from file "../../BlockWars/sign.yml"
- set {bw.config::sign-block.enable} to yaml value "sign.block-change.enable" from file "../../BlockWars/sign.yml"
- set {bw.config::sign-block.waiting} to yaml value "sign.block-change.blocks.waiting" from file "../../BlockWars/sign.yml"
- set {bw.config::sign-block.starting} to yaml value "sign.block-change.blocks.starting" from file "../../BlockWars/sign.yml"
- set {bw.config::sign-block.gingame} to yaml value "sign.block-change.blocks.ingame" from file "../../BlockWars/sign.yml"
- set {bw.config::sign-block.rebuild} to yaml value "sign.block-change.blocks.rebuild" from file "../../BlockWars/sign.yml"
- set {bw.config::sign-block.notready} to yaml value "sign.block-change.blocks.notready" from file "../../BlockWars/sign.yml"
- on load:
- if existence of "plugins/BlockWars/kits.yml" is false:
- create file "plugins/BlockWars/kits.yml"
- set yaml value "config.kits.warrior.name" from file "../../BlockWars/kits.yml" to "Warrior"
- set yaml value "config.kits.warrior.lore" from file "../../BlockWars/kits.yml" to "&7- &aStone sword//&7- &aBow &7(3 arrows)//&7- &aLeather chestplate//&7- &aLeather leggings//&7- &aWooden pickaxe"
- set yaml value "config.kits.warrior.icon" from file "../../BlockWars/kits.yml" to "1 272:0"
- set yaml value "config.kits.warrior.purchase" from file "../../BlockWars/kits.yml" to "false"
- set yaml value "config.kits.warrior.price" from file "../../BlockWars/kits.yml" to "0"
- set yaml value "config.kits.warrior.armour.helmet" from file "../../BlockWars/kits.yml" to "0:0"
- set yaml value "config.kits.warrior.armour.chestplate" from file "../../BlockWars/kits.yml" to "299:0"
- set yaml value "config.kits.warrior.armour.leggings" from file "../../BlockWars/kits.yml" to "300:0"
- set yaml value "config.kits.warrior.armour.boots" from file "../../BlockWars/kits.yml" to "0:0"
- set yaml value "config.kits.warrior.items.1 272:0" from file "../../BlockWars/kits.yml" to ""
- set yaml value "config.kits.warrior.items.1 270:0" from file "../../BlockWars/kits.yml" to ""
- set yaml value "config.kits.warrior.items.1 261:0" from file "../../BlockWars/kits.yml" to ""
- set yaml value "config.kits.warrior.items.3 262:0" from file "../../BlockWars/kits.yml" to ""
- set yaml value "config.kits.archer.name" from file "../../BlockWars/kits.yml" to "Archer"
- set yaml value "config.kits.archer.lore" from file "../../BlockWars/kits.yml" to "&7- &aKnockback stick//&7- &aChain chestplate//&7- &aBow &7(20 arrows)//&7- &aWooden pickaxe"
- set yaml value "config.kits.archer.icon" from file "../../BlockWars/kits.yml" to "1 261:0"
- set yaml value "config.kits.archer.purchase" from file "../../BlockWars/kits.yml" to "false"
- set yaml value "config.kits.archer.price" from file "../../BlockWars/kits.yml" to "0"
- set yaml value "config.kits.archer.armour.helmet" from file "../../BlockWars/kits.yml" to "0:0"
- set yaml value "config.kits.archer.armour.chestplate" from file "../../BlockWars/kits.yml" to "303:0"
- set yaml value "config.kits.archer.armour.leggings" from file "../../BlockWars/kits.yml" to "0:0"
- set yaml value "config.kits.archer.armour.boots" from file "../../BlockWars/kits.yml" to "0:0"
- set yaml value "config.kits.archer.items.1 blaze rod of knockback 2" from file "../../BlockWars/kits.yml" to ""
- set yaml value "config.kits.archer.items.1 270:0" from file "../../BlockWars/kits.yml" to ""
- set yaml value "config.kits.archer.items.1 261:0" from file "../../BlockWars/kits.yml" to ""
- set yaml value "config.kits.archer.items.20 262:0" from file "../../BlockWars/kits.yml" to ""
- set yaml value "config.kits.runner.name" from file "../../BlockWars/kits.yml" to "Runner"
- set yaml value "config.kits.runner.lore" from file "../../BlockWars/kits.yml" to "&7- &aLeather chestplate//&7- &aLeather leggings//&7- &aSpeed II//&7- &aWood sword//&7- &aWooden pickaxe"
- set yaml value "config.kits.runner.icon" from file "../../BlockWars/kits.yml" to "1 373:8194"
- set yaml value "config.kits.runner.purchase" from file "../../BlockWars/kits.yml" to "false"
- set yaml value "config.kits.runner.price" from file "../../BlockWars/kits.yml" to "0"
- set yaml value "config.kits.runner.armour.helmet" from file "../../BlockWars/kits.yml" to "0:0"
- set yaml value "config.kits.runner.armour.chestplate" from file "../../BlockWars/kits.yml" to "299:0"
- set yaml value "config.kits.runner.armour.leggings" from file "../../BlockWars/kits.yml" to "300:0"
- set yaml value "config.kits.runner.armour.boots" from file "../../BlockWars/kits.yml" to "0:0"
- set yaml value "config.kits.runner.items.1 268:0" from file "../../BlockWars/kits.yml" to ""
- set yaml value "config.kits.runner.items.1 270:0" from file "../../BlockWars/kits.yml" to ""
- set yaml value "config.kits.runner.items.1 373:8194" from file "../../BlockWars/kits.yml" to ""
- set yaml value "config.kits.miner.name" from file "../../BlockWars/kits.yml" to "Miner"
- set yaml value "config.kits.miner.lore" from file "../../BlockWars/kits.yml" to "&7- &aWood sword//&7- &aLeather armor//&7- &aBow &7(3 arrows)//&7- &aStone pickaxe &7(drops blocks)"
- set yaml value "config.kits.miner.icon" from file "../../BlockWars/kits.yml" to "1 274:0"
- set yaml value "config.kits.miner.purchase" from file "../../BlockWars/kits.yml" to "true"
- set yaml value "config.kits.miner.price" from file "../../BlockWars/kits.yml" to "200"
- set yaml value "config.kits.miner.armour.helmet" from file "../../BlockWars/kits.yml" to "301:0"
- set yaml value "config.kits.miner.armour.chestplate" from file "../../BlockWars/kits.yml" to "299:0"
- set yaml value "config.kits.miner.armour.leggings" from file "../../BlockWars/kits.yml" to "300:0"
- set yaml value "config.kits.miner.armour.boots" from file "../../BlockWars/kits.yml" to "298:0"
- set yaml value "config.kits.miner.items.1 268:0" from file "../../BlockWars/kits.yml" to ""
- set yaml value "config.kits.miner.items.1 274:0" from file "../../BlockWars/kits.yml" to ""
- set yaml value "config.kits.miner.items.1 261:0" from file "../../BlockWars/kits.yml" to ""
- set yaml value "config.kits.miner.items.3 262:0" from file "../../BlockWars/kits.yml" to ""
- set yaml value "config.kits.tank.name" from file "../../BlockWars/kits.yml" to "Tank"
- set yaml value "config.kits.tank.lore" from file "../../BlockWars/kits.yml" to "&7- &aIron chestplate//&7- &aIron leggings//&7- &aBow &7(2 arrows)//&7- &aWooden pickaxe"
- set yaml value "config.kits.tank.icon" from file "../../BlockWars/kits.yml" to "1 307:0"
- set yaml value "config.kits.tank.purchase" from file "../../BlockWars/kits.yml" to "true"
- set yaml value "config.kits.tank.price" from file "../../BlockWars/kits.yml" to "600"
- set yaml value "config.kits.tank.armour.helmet" from file "../../BlockWars/kits.yml" to "0:0"
- set yaml value "config.kits.tank.armour.chestplate" from file "../../BlockWars/kits.yml" to "307:0"
- set yaml value "config.kits.tank.armour.leggings" from file "../../BlockWars/kits.yml" to "308:0"
- set yaml value "config.kits.tank.armour.boots" from file "../../BlockWars/kits.yml" to "0:0"
- set yaml value "config.kits.tank.items.1 270:0" from file "../../BlockWars/kits.yml" to ""
- set yaml value "config.kits.tank.items.1 261:0" from file "../../BlockWars/kits.yml" to ""
- set yaml value "config.kits.tank.items.2 262:0" from file "../../BlockWars/kits.yml" to ""
- set yaml value "config.kits.builder.name" from file "../../BlockWars/kits.yml" to "Builder"
- set yaml value "config.kits.builder.lore" from file "../../BlockWars/kits.yml" to "&7- &aWood sword//&7- &aLeather chestplate//&7- &aBow &7(3 arrows)//&7- &a5 blocks per respawn//&7- &aWooden pickaxe"
- set yaml value "config.kits.builder.icon" from file "../../BlockWars/kits.yml" to "1 159:4"
- set yaml value "config.kits.builder.purchase" from file "../../BlockWars/kits.yml" to "true"
- set yaml value "config.kits.builder.price" from file "../../BlockWars/kits.yml" to "350"
- set yaml value "config.kits.builder.armour.helmet" from file "../../BlockWars/kits.yml" to "0:0"
- set yaml value "config.kits.builder.armour.chestplate" from file "../../BlockWars/kits.yml" to "299:0"
- set yaml value "config.kits.builder.armour.leggings" from file "../../BlockWars/kits.yml" to "0:0"
- set yaml value "config.kits.builder.armour.boots" from file "../../BlockWars/kits.yml" to "0:0"
- set yaml value "config.kits.builder.items.1 268:0" from file "../../BlockWars/kits.yml" to ""
- set yaml value "config.kits.builder.items.1 270:0" from file "../../BlockWars/kits.yml" to ""
- set yaml value "config.kits.builder.items.1 261:0" from file "../../BlockWars/kits.yml" to ""
- set yaml value "config.kits.builder.items.3 262:0" from file "../../BlockWars/kits.yml" to ""
- set yaml value "config.kits.builder.items.5 159:4" from file "../../BlockWars/kits.yml" to ""
- set yaml value "config.kits.jumper.name" from file "../../BlockWars/kits.yml" to "Jumper"
- set yaml value "config.kits.jumper.lore" from file "../../BlockWars/kits.yml" to "&7- &aWood sword//&7- &aLeather armor//&7- &aBow &7(1 arrows)//&7- &aJump bost II"
- set yaml value "config.kits.jumper.icon" from file "../../BlockWars/kits.yml" to "1 301:0"
- set yaml value "config.kits.jumper.purchase" from file "../../BlockWars/kits.yml" to "true"
- set yaml value "config.kits.jumper.price" from file "../../BlockWars/kits.yml" to "600"
- set yaml value "config.kits.jumper.armour.helmet" from file "../../BlockWars/kits.yml" to "298:0"
- set yaml value "config.kits.jumper.armour.chestplate" from file "../../BlockWars/kits.yml" to "299:0"
- set yaml value "config.kits.jumper.armour.leggings" from file "../../BlockWars/kits.yml" to "300:0"
- set yaml value "config.kits.jumper.armour.boots" from file "../../BlockWars/kits.yml" to "301:0"
- set yaml value "config.kits.jumper.items.1 268:0" from file "../../BlockWars/kits.yml" to ""
- set yaml value "config.kits.jumper.items.1 261:0" from file "../../BlockWars/kits.yml" to ""
- set yaml value "config.kits.jumper.items.1 262:0" from file "../../BlockWars/kits.yml" to ""
- set yaml value "config.kits.jumper.items.1 373:8235" from file "../../BlockWars/kits.yml" to ""
- on load:
- if existence of "plugins/BlockWars/rewards.yml" is false:
- create file "plugins/BlockWars/rewards.yml"
- set yaml value "config.rewards.win.money.enable" from file "../../BlockWars/rewards.yml" to "true"
- set yaml value "config.rewards.win.money.amount" from file "../../BlockWars/rewards.yml" to "15"
- set yaml value "config.rewards.win.command.enable" from file "../../BlockWars/rewards.yml" to "false"
- set yaml value "config.rewards.win.command.cmd" from file "../../BlockWars/rewards.yml" to "give <player> diamond 5"
- set yaml value "config.rewards.win.message.enable" from file "../../BlockWars/rewards.yml" to "true"
- set yaml value "config.rewards.win.message.msg" from file "../../BlockWars/rewards.yml" to "&6+15 points"
- set yaml value "config.rewards.capture.money.enable" from file "../../BlockWars/rewards.yml" to "true"
- set yaml value "config.rewards.capture.money.amount" from file "../../BlockWars/rewards.yml" to "10"
- set yaml value "config.rewards.capture.command.enable" from file "../../BlockWars/rewards.yml" to "false"
- set yaml value "config.rewards.capture.command.cmd" from file "../../BlockWars/rewards.yml" to ""
- set yaml value "config.rewards.capture.message.enable" from file "../../BlockWars/rewards.yml" to "true"
- set yaml value "config.rewards.capture.message.msg" from file "../../BlockWars/rewards.yml" to "&6+10 points"
- set yaml value "config.rewards.dropped.money.enable" from file "../../BlockWars/rewards.yml" to "true"
- set yaml value "config.rewards.dropped.money.amount" from file "../../BlockWars/rewards.yml" to "5"
- set yaml value "config.rewards.dropped.command.enable" from file "../../BlockWars/rewards.yml" to "false"
- set yaml value "config.rewards.dropped.command.cmd" from file "../../BlockWars/rewards.yml" to ""
- set yaml value "config.rewards.dropped.message.enable" from file "../../BlockWars/rewards.yml" to "true"
- set yaml value "config.rewards.dropped.message.msg" from file "../../BlockWars/rewards.yml" to "&6+5 points"
- set yaml value "config.rewards.kill.money.enable" from file "../../BlockWars/rewards.yml" to "true"
- set yaml value "config.rewards.kill.money.amount" from file "../../BlockWars/rewards.yml" to "5"
- set yaml value "config.rewards.kill.command.enable" from file "../../BlockWars/rewards.yml" to "false"
- set yaml value "config.rewards.kill.command.cmd" from file "../../BlockWars/rewards.yml" to ""
- set yaml value "config.rewards.kill.message.enable" from file "../../BlockWars/rewards.yml" to "true"
- set yaml value "config.rewards.kill.message.msg" from file "../../BlockWars/rewards.yml" to "&6+5 points"
- set yaml value "config.rewards.participation.money.enable" from file "../../BlockWars/rewards.yml" to "true"
- set yaml value "config.rewards.participation.money.amount" from file "../../BlockWars/rewards.yml" to "1"
- set yaml value "config.rewards.participation.command.enable" from file "../../BlockWars/rewards.yml" to "false"
- set yaml value "config.rewards.participation.command.cmd" from file "../../BlockWars/rewards.yml" to ""
- set yaml value "config.rewards.participation.message.enable" from file "../../BlockWars/rewards.yml" to "false"
- set yaml value "config.rewards.participation.message.msg" from file "../../BlockWars/rewards.yml" to "&6+1 point"
- on load:
- if existence of "plugins/BlockWars/scoreboard.yml" is false:
- create file "plugins/BlockWars/scoreboard.yml"
- wf "## BlockWars MINIGAME - Scoreboard ##" to "plugins/BlockWars/scoreboard.yml"
- wf "## Lobby Variables: <arena> - <amount> - <max> - <empty> ##" to "plugins/BlockWars/scoreboard.yml"
- wf "## Ingame Variables: <arena> - <amount> - <max> - <phase> - <time> - <blue-flag-captured> - <red-flag-captured> - <empty> ##" to "plugins/BlockWars/scoreboard.yml"
- wf "## Maximum 40 characters per line ##" to "plugins/BlockWars/scoreboard.yml"
- set yaml value "scoreboard.lobby.title" from file "../../BlockWars/scoreboard.yml" to "&e&lBlockWars"
- add "&2Map" to yaml list "scoreboard.lobby.lines" from file "../../BlockWars/scoreboard.yml"
- add "&f<arena>" to yaml list "scoreboard.lobby.lines" from file "../../BlockWars/scoreboard.yml"
- add "<empty>" to yaml list "scoreboard.lobby.lines" from file "../../BlockWars/scoreboard.yml"
- add "&2Players" to yaml list "scoreboard.lobby.lines" from file "../../BlockWars/scoreboard.yml"
- add "&f<amount>/<max>" to yaml list "scoreboard.lobby.lines" from file "../../BlockWars/scoreboard.yml"
- add "<empty>" to yaml list "scoreboard.lobby.lines" from file "../../BlockWars/scoreboard.yml"
- add "&fwww.mc-server.com" to yaml list "scoreboard.lobby.lines" from file "../../BlockWars/scoreboard.yml"
- set yaml value "scoreboard.ingame.title" from file "../../BlockWars/scoreboard.yml" to "&e&lBlockWars"
- add "<phase>&7: <time>" to yaml list "scoreboard.ingame.lines" from file "../../BlockWars/scoreboard.yml"
- add "<empty>" to yaml list "scoreboard.ingame.lines" from file "../../BlockWars/scoreboard.yml"
- add "&9Blue&7: <blue-flag-captured> captures" to yaml list "scoreboard.ingame.lines" from file "../../BlockWars/scoreboard.yml"
- add "&cRed&7: <red-flag-captured> captures" to yaml list "scoreboard.ingame.lines" from file "../../BlockWars/scoreboard.yml"
- add "<empty>" to yaml list "scoreboard.ingame.lines" from file "../../BlockWars/scoreboard.yml"
- add "&fwww.mc-server.com" to yaml list "scoreboard.ingame.lines" from file "../../BlockWars/scoreboard.yml"
- set {bw.config::scoreboard-lobby::title} to yaml value "scoreboard.lobby.title" from file "../../BlockWars/scoreboard.yml"
- set {bw.config::scoreboard-lobby::lines::*} to yaml list "scoreboard.lobby.lines" from file "../../BlockWars/scoreboard.yml"
- set {bw.config::scoreboard-ingame::title} to yaml value "scoreboard.ingame.title" from file "../../BlockWars/scoreboard.yml"
- set {bw.config::scoreboard-ingame::lines::*} to yaml list "scoreboard.ingame.lines" from file "../../BlockWars/scoreboard.yml"
- on load:
- if size of {bw.arena-list::*} > 0:
- wait 5 seconds
- loop {bw.arena-list::*}:
- if {bw.status.%loop-value%} is not "Waiting" or "NotReady":
- if {bw.arena.%loop-value%} is set:
- make console execute command "/blockwars stop %loop-value%"
- command /blockwars [<text>] [<text>] [<integer>]:
- aliases: /bw
- trigger:
- if arg 1 is not "kits" or "shop" or "info" or "help" or "?" or "update" or "reload" or "setholo" or "sethologram" or "setmainlobby" or "create" or "delete" or "setlobby" or "setplayerperteam" or "setplayersperteam" or "tool" or "setwall" or "setwalls" or "setspawn" or "setblock" or "setvillager" or "check" or "save" or "edit" or "stop" or "list" or "join" or "leave":
- send "%{bw.config::prefix}% &cUnknown command. Use /bw ? for a list of commands!"
- if arg 1 is not set:
- make sender execute command "/bw ?"
- if arg 1 is "info":
- send "%{bw.config::prefix}% &fPlugin create by LuisGerdez. This version is v.{@VersionID}!"
- if arg 1 is "help" or "?":
- if sender is player:
- send "%{bw.config::prefix}% &fCommand List:"
- send "&2&lCommands for users"
- send "&f/blockwars shop - &2Open shop menu"
- send "&f/blockwars join <arena> - &2Join arena"
- send "&f/blockwars leave - &2Leave arena"
- send "&f/blockwars info - &2View information about the plugin"
- if player has permission "blockwars.admin":
- send "&2&lCommands for setup arena"
- send "&f/blockwars setmainlobby - &2Set main lobby"
- send "&f/blockwars sethologram - &2Set location of hologram of stats"
- send "&f/blockwars tool - &2Get selection tool"
- send "&f/blockwars create <arena> - &2Create arena"
- send "&f/blockwars delete <arena> - &2Delete arena"
- send "&f/blockwars setlobby <arena> - &2Set lobby for arena"
- send "&f/blockwars setminplayers <arena> <integer> - &2Set min players to start"
- send "&f/blockwars setplayerperteam <arena> <integer> - &2Set max players per team"
- send "&f/blockwars setwall <arena> - &2Set wall"
- send "&f/blockwars setspawn <arena> - &2Get objects to set spawn"
- send "&f/blockwars setblock <arena> - &2Get objects to set block"
- send "&f/blockwars save <arena> - &2Save arena"
- send "&2&lCommands for administrators"
- send "&f/blockwars list - &2List of all games"
- send "&f/blockwars check <arena> - &2See setting of the game"
- send "&f/blockwars edit <arena> - &2Edit arena"
- send "&f/blockwars stop <arena> - &2Stop arena"
- send "&f/blockwars reload - &2Reload all config file"
- send "&f/blockwars update - &2Check for updates"
- else if sender is console:
- send "&2&lCommands for console"
- send "&f/blockwars list - &2List of all games"
- send "&f/blockwars check <arena> - &2See setting of the game"
- send "&f/blockwars stop <arena> - &2Stop arena"
- send "&f/blockwars reload - &2Reload all config file"
- send "&f/blockwars update - &2Check for updates"
- if arg 1 is "update":
- if sender is player:
- if player has permission "blockwars.admin":
- if text from "http://pastebin.com/raw/7B4aA8fD" is not "{@VersionID}":
- send "%{bw.config::prefix}% &aNew version available!"
- else:
- send "%{bw.config::prefix}% &cNo version available!"
- else:
- send "&c%{bw.config-msg::error::no-permission}%"
- else if sender is console:
- if text from "http://pastebin.com/raw/7B4aA8fD" is not "{@VersionID}":
- send "%{bw.config::prefix}% &aNew version available!"
- else:
- send "%{bw.config::prefix}% &cNo version available!"
- if arg 1 is "reload":
- if sender is player:
- if player has permission "blockwars.admin":
- invoke "bw-files-reload" from player
- else:
- send "%{bw.config::prefix}% &c%{bw.config-msg::error::no-permission}%"
- else if sender is console:
- invoke "bw-files-reload" from console
- if arg 1 is "kits" or "shop":
- if sender is player:
- set {_kits::*} to yaml nodes "config.kits" from file "../../BlockWars/kits.yml"
- if {_kits::*} is set:
- set {_rows} to size of {_kits::*}/9
- if {_rows} < 1:
- set {_rows} to 1
- else if {_rows} > 6:
- set {_rows} to 6
- set {_slot} to 0
- open chest with {_rows} rows named "%{bw.config::shop::shop-title-gui}%" to player
- wait 1 tick
- loop {_kits::*}:
- set {_purchase} to yaml value "config.kits.%loop-value%.purchase" from file "../../BlockWars/kits.yml"
- if {_purchase} is "true":
- set {_name} to yaml value "config.kits.%loop-value%.name" from file "../../BlockWars/kits.yml"
- set {_lore} to yaml value "config.kits.%loop-value%.lore" from file "../../BlockWars/kits.yml"
- set {_price} to yaml value "config.kits.%loop-value%.price" from file "../../BlockWars/kits.yml"
- set {_lore} to "&6Price: &a%{_price}% points//%{_lore}%"
- replace all "//" with "||" in {_lore}
- if {bw.%player%.kits-purchased::%loop-value%} is not set:
- set {_name} to "&c%{_name}%"
- else:
- set {_name} to "&a%{_name}%"
- set {_icon} to yaml value "config.kits.%loop-value%.icon" from file "../../BlockWars/kits.yml"
- set {_icon} to {_icon} parsed as item
- set {_gui} to "format slot {_slot} of player with {_icon} named ""%{_name}%"" with lore ""%coloured {_lore}%"" to close then run [invoke ""bw-buy-kit"" from player and ""%loop-value%""]"
- evaluate {_gui}
- add 1 to {_slot}
- else if sender is console:
- send "%{bw.config::prefix}% &cThis command can only be executed by players!" to console
- if arg 1 is "setmainlobby":
- if sender is player:
- if player has permission "blockwars.admin":
- set {bw.mainlobby} to location of player
- send "%{bw.config::prefix}% &fYou have established the main lobby!"
- else:
- send "%{bw.config::prefix}% &c%{bw.config-msg::error::no-permission}%"
- else if sender is console:
- send "%{bw.config::prefix}% &cThis command can only be executed by players!" to console
- if arg 1 is "setholo" or "sethologram":
- if sender is player:
- if player has permission "blockwars.admin":
- set {bw.loc-holo} to location of player
- evaluate "create hologram ""&7%{bw.config::prefix}%;&aYou have established the location of hologram!"" at {bw.loc-holo} for 3 seconds"
- else:
- send "%{bw.config::prefix}% &c%{bw.config-msg::error::no-permission}%"
- else if sender is console:
- send "%{bw.config::prefix}% &cThis command can only be executed by players!" to console
- if arg 1 is "create":
- if sender is player:
- if player has permission "blockwars.admin":
- if arg 2 is set:
- if {bw.arena.%arg 2%} is not set:
- if {bw-setup.%player%.pos1} is set:
- if {bw-setup.%player%.pos2} is set:
- set {bw.arena.%arg 2%} to true
- add arg 2 to {bw.arena-list::*}
- set {bw.status.%arg 2%} to "NotReady"
- set {bw.amountplayers.%arg 2%} to 0
- set {bw.minplayers.%arg 2%} to {bw.config::config::default_min_players}
- set {bw.playerperteam.%arg 2%} to {bw.config::config::default_players_per_team}
- set {bw.countdown-started?.%arg 2%} to false
- set {bw.map-pos1.%arg 2%} to {bw-setup.%player%.pos1}
- set {bw.map-pos2.%arg 2%} to {bw-setup.%player%.pos2}
- wait 1 tick
- delete {bw-setup.%player%.pos1}
- delete {bw-setup.%player%.pos2}
- send "%{bw.config::prefix}% &fYou have created the game &2%arg 2% &fwith success!"
- else:
- send "%{bw.config::prefix}% &cYou have not set the position 2! Use /blockwars tool for get the tool"
- else:
- send "%{bw.config::prefix}% &cYou have not set the position 1! Use /blockwars tool for get the tool"
- else:
- send "%{bw.config::prefix}% &cThis arena already exists!"
- else:
- send "%{bw.config::prefix}% &cUse /blockwars create <arena>"
- else:
- send "%{bw.config::prefix}% &c%{bw.config-msg::error::no-permission}%"
- else if sender is console:
- send "%{bw.config::prefix}% &cThis command can only be executed by players!" to console
- if arg 1 is "delete":
- if sender is player:
- if player has permission "blockwars.admin":
- if arg 2 is set:
- if {bw.arena.%arg 2%} is set:
- delete {bw.arena.%arg 2%}
- remove arg 2 from {bw.arena-list::*}
- delete {bw.status.%arg 2%}
- delete {bw.amountplayers.%arg 2%}
- delete {bw.minplayers.%arg 2%}
- delete {bw.playerperteam.%arg 2%}
- delete {bw.map-pos1.%arg 2%}
- delete {bw.map-pos2.%arg 2%}
- delete {bw.lobby.%arg 2%}
- delete {bw.wall-pos1.%arg 2%}
- delete {bw.wall-pos2.%arg 2%}
- delete {bw.regen-blocks.%arg 2%::*}
- delete {bw.red-villager.%arg 2%::location}
- delete {bw.blue-villager.%arg 2%::location}
- delete {bw.blue-villager.%arg 2%::id}
- delete {bw.red-villager.%arg 2%::id}
- send "%{bw.config::prefix}% &fYou removed the game &2%arg 2% &fwith success!"
- else:
- send "%{bw.config::prefix}% &cThis game does not exist!"
- else:
- send "%{bw.config::prefix}% &cUse /blockwars delete <arena>"
- else:
- send "%{bw.config::prefix}% &c%{bw.config-msg::error::no-permission}%"
- else if sender is console:
- send "%{bw.config::prefix}% &cThis command can only be executed by players!" to console
- if arg 1 is "setlobby":
- if sender is player:
- if player has permission "blockwars.admin":
- if arg 2 is set:
- if {bw.arena.%arg 2%} is set:
- if {bw.status.%arg 2%} is "NotReady":
- set {bw.lobby.%arg 2%} to location of player
- send "%{bw.config::prefix}% &fThe lobby waiting of game &2%arg 2% &fbeen established successfully!"
- else:
- send "%{bw.config::prefix}% &cThis game is already saved, use /bw edit %arg 2% to do this."
- else:
- send "%{bw.config::prefix}% &cThis game does not exist!"
- else:
- send "%{bw.config::prefix}% &cUse /blockwars setlobby <arena>"
- else:
- send "%{bw.config::prefix}% &c%{bw.config-msg::error::no-permission}%"
- else if sender is console:
- send "%{bw.config::prefix}% &cThis command can only be executed by players!" to console
- if arg 1 is "setminplayers":
- if sender is player:
- if player has permission "blockwars.admin":
- if {bw.arena.%arg 2%} is set:
- if {bw.status.%arg 2%} is "NotReady":
- if integer arg 1 is set:
- if integer arg 1 > 1:
- set {bw.minplayers.%arg 2%} to integer arg 1
- send "%{bw.config::prefix}% &fYou set the min players in the game to &2%integer arg 1% &fplayers!"
- else:
- send "&7%{bw.config::prefix}% &cThe min number of players must be greater than 1!"
- else:
- send "&7%{bw.config::prefix}% &cUse /bw setminplayers %arg 2% <integer>"
- else:
- send "&7%{bw.config::prefix}% &cThis game is already saved, use /bw edit %arg 2% to do this."
- else:
- send "&7%{bw.config::prefix}% &cThis game does not exist!"
- else:
- send "%{bw.config::prefix}% &c%{bw.config-msg::no-permission}%"
- else if sender is console:
- send "&7%{bw.config::prefix}% &cThis command can only be executed by players!" to console
- if arg 1 is "setplayerperteam" or "setplayersperteam":
- if sender is player:
- if player has permission "blockwars.admin":
- if arg 2 is set:
- if {bw.arena.%arg 2%} is set:
- if {bw.status.%arg 2%} is "NotReady":
- if integer arg 1 is set:
- if integer arg 1 > 1:
- set {bw.playerperteam.%arg 2%} to integer arg 1
- send "%{bw.config::prefix}% &fYou set the maximum number of players per team of game &2%arg 2% &fto &2%integer arg 1%&f!"
- else:
- send "&7%{bw.config::prefix}% &cThe min number of players must be greater than 1!"
- else:
- send "%{bw.config::prefix}% &cUse /blockwars setplayerperteam <arena> <number>"
- else:
- send "%{bw.config::prefix}% &cThis game is already saved, use /bw edit %arg 2% to do this."
- else:
- send "%{bw.config::prefix}% &cThis game does not exist!"
- else:
- send "%{bw.config::prefix}% &cUse /blockwars setplayerperteam <arena> <number>"
- else:
- send "%{bw.config::prefix}% &c%{bw.config-msg::error::no-permission}%"
- else if sender is console:
- send "%{bw.config::prefix}% &cThis command can only be executed by players!" to console
- if arg 1 is "tool":
- if sender is player:
- if player has permission "blockwars.admin":
- give a arrow named "&a&lBlockWars Tool" to player
- send "%{bw.config::prefix}% &fYou received the selection tool!"
- else:
- send "%{bw.config::prefix}% &c%{bw.config-msg::error::no-permission}%"
- else if sender is console:
- send "%{bw.config::prefix}% &cThis command can only be executed by players!" to console
- if arg 1 is "setwall" or "setwalls":
- if sender is player:
- if player has permission "blockwars.admin":
- if arg 2 is set:
- if {bw.arena.%arg 2%} is set:
- if {bw-setup.%player%.pos1} is set:
- if {bw-setup.%player%.pos2} is set:
- if {bw.status.%arg 2%} is "NotReady":
- set {bw.wall-pos1.%arg 2%} to {bw-setup.%player%.pos1}
- set {bw.wall-pos2.%arg 2%} to {bw-setup.%player%.pos2}
- wait 1 tick
- delete {bw-setup.%player%.pos1}
- delete {bw-setup.%player%.pos2}
- send "%{bw.config::prefix}% &fWall of game &2%arg 2% &fbeen established successfully!"
- else:
- send "%{bw.config::prefix}% &cThis game is already saved, use /bw edit %arg 2% to do this."
- else:
- send "%{bw.config::prefix}% &cYou have not set the position 2! Use /blockwars tool for get the tool"
- else:
- send "%{bw.config::prefix}% &cYou have not set the position 1! Use /blockwars tool for get the tool"
- else:
- send "%{bw.config::prefix}% &cThis game does not exist!"
- else:
- send "%{bw.config::prefix}% &cUse /blockwars setwall <arena>"
- else:
- send "%{bw.config::prefix}% &c%{bw.config-msg::error::no-permission}%"
- else if sender is console:
- send "%{bw.config::prefix}% &cThis command can only be executed by players!" to console
- if arg 1 is "setspawn":
- if sender is player:
- if player has permission "blockwars.admin":
- if arg 2 is set:
- if {bw.arena.%arg 2%} is set:
- if {bw.status.%arg 2%} is "NotReady":
- clear player's inventory
- give red wool named "&4Set Red Spawn" with lore "&7%arg 2%" to player
- give blue wool named "&9Set Blue Spawn" with lore "&7%arg 2%" to player
- send "%{bw.config::prefix}% &fUse items to set the spawn of the game &2%arg 2%&f!"
- else:
- send "%{bw.config::prefix}% &cThis game is already saved, use /bw edit %arg 2% to do this."
- else:
- send "%{bw.config::prefix}% &cThis game does not exist!"
- else:
- send "%{bw.config::prefix}% &cUse /blockwars setspawn <arena>"
- else:
- send "%{bw.config::prefix}% &c%{bw.config-msg::error::no-permission}%"
- else if sender is console:
- send "%{bw.config::prefix}% &cThis command can only be executed by players!" to console
- if arg 1 is "setblock":
- if sender is player:
- if player has permission "blockwars.admin":
- if arg 2 is set:
- if {bw.arena.%arg 2%} is set:
- if {bw.status.%arg 2%} is "NotReady":
- clear player's inventory
- give red wool named "&4Set Red Block" with lore "&7%arg 2%" to player
- give blue wool named "&9Set Blue Block" with lore "&7%arg 2%" to player
- send "%{bw.config::prefix}% &fUse items to set the flags of each team of the game &2%arg 2%&f!"
- else:
- send "%{bw.config::prefix}% &cThis game is already saved, use /bw edit %arg 2% to do this."
- else:
- send "%{bw.config::prefix}% &cThis game does not exist!"
- else:
- send "%{bw.config::prefix}% &cUse /blockwars setblock <arena>"
- else:
- send "%{bw.config::prefix}% &c%{bw.config-msg::error::no-permission}%"
- else if sender is console:
- send "%{bw.config::prefix}% &cThis command can only be executed by players!" to console
- if arg 1 is "setvillager":
- if sender is player:
- if player has permission "blockwars.admin":
- if arg 2 is set:
- if {bw.arena.%arg 2%} is set:
- if {bw.status.%arg 2%} is "NotReady":
- clear player's inventory
- give red wool named "&4Set Red Villager" with lore "&7%arg 2%" to player
- give blue wool named "&9Set Blue Villager" with lore "&7%arg 2%" to player
- send "%{bw.config::prefix}% &fUse items to set spawn of villager to select kits of the game &2%arg 2%&f!"
- else:
- send "%{bw.config::prefix}% &cThis game is already saved, use /bw edit %arg 2% to do this."
- else:
- send "%{bw.config::prefix}% &cThis game does not exist!"
- else:
- send "%{bw.config::prefix}% &cUse /blockwars setblock <arena>"
- else:
- send "%{bw.config::prefix}% &c%{bw.config-msg::error::no-permission}%"
- else if sender is console:
- send "%{bw.config::prefix}% &cThis command can only be executed by players!" to console
- if arg 1 is "check":
- if sender is player:
- if player has permission "blockwars.admin":
- if arg 2 is set:
- if {bw.arena.%arg 2%} is set:
- send "&a&l BLOCK WARS - Arena Check"
- send "&e> &f&l&nSetup Info:"
- if {bw.status.%arg 2%} is set:
- send "&e> &f&lStatus: &f%{bw.status.%arg 2%}%"
- else:
- send "&e> &f&lStatus: &8No set"
- if {bw.lobby.%arg 2%} is set:
- send "&e> &f&lLoc Lobby: &f%{bw.lobby.%arg 2%}%"
- else:
- send "&e> &f&lLoc Lobby: &8No set"
- if {bw.bluespawn.%arg 2%} is set:
- send "&e> &9&lBlue &f&lSpawn: &f%{bw.bluespawn.%arg 2%}%"
- else:
- send "&e> &9&lBlue &f&lSpawn: &8No set"
- if {bw.redspawn.%arg 2%} is set:
- send "&e> &4&lRed &f&lSpawn: &f%{bw.redspawn.%arg 2%}%"
- else:
- send "&e> &4&lRed &f&lSpawn: &8No set"
- if {bw.blueblock.%arg 2%} is set:
- send "&e> &9&lBlue &f&lFlag: &f%{bw.blueblock.%arg 2%}%"
- else:
- send "&e> &9&lBlue &f&lFlag: &8No set"
- if {bw.redblock.%arg 2%} is set:
- send "&e> &4&lRed &f&lFlag: &f%{bw.redblock.%arg 2%}%"
- else:
- send "&e> &4&lRed &f&lFlag: &8No set"
- if {bw.blue-villager.%arg 2%::location} is set:
- send "&e> &9&lBlue &f&lVillager Location: &f%{bw.blue-villager.%arg 2%::location}%"
- else:
- send "&e> &9&lBlue &f&lVillager Location: &8No set"
- if {bw.red-villager.%arg 2%::location} is set:
- send "&e> &4&lRed &f&lVillager Location: &f%{bw.red-villager.%arg 2%::location}%"
- else:
- send "&e> &4&lRed &f&lVillager Location: &8No set"
- if {bw.blue-villager.%arg 2%::id} is set:
- send "&e> &9&lBlue &f&lVillager Citizens ID: &f%{bw.blue-villager.%arg 2%::id}%"
- else:
- send "&e> &9&lBlue &f&lVillager Citizens ID: &8No set"
- if {bw.red-villager.%arg 2%::id} is set:
- send "&e> &4&lRed &f&lVillager Citizens ID: &f%{bw.red-villager.%arg 2%::id}%"
- else:
- send "&e> &4&lRed &f&lVillager Citizens ID: &8No set"
- send "&e> &f&l&nGame Info:"
- if {bw.phase.%arg 2%} is set:
- send "&e> &f&lPhase: &f%{bw.phase.%arg 2%}%"
- else:
- send "&e> &f&lPhase: &8No Definite"
- send "&e> &f&lPlayers Total Mount: &f%{bw.amountplayers.%arg 2%}%"
- send "&e> &f&lPlaying Players:"
- if size of {bw.players.%arg 2%::*} > 0:
- loop {bw.players.%arg 2%::*}:
- send " %loop-value%"
- else:
- send " &8No Players"
- send "&e> &f&l&nTeam Info:"
- if size of {bw.red-team.%arg 2%::*} > 0:
- send "&e> &4Red Players: &f%{bw.red-team.%arg 2%::*}%"
- else:
- send "&e> &4Red Players: &8No Players"
- if size of {bw.blue-team.%arg 2%::*} > 0:
- send "&e> &9Blue Players: &f%{bw.blue-team.%arg 2%::*}%"
- else:
- send "&e> &9Blue Players: &8No Players"
- else:
- send "&cThis game does not exist!"
- else:
- send "&cUse /blockwars check <arena>"
- else:
- send "&c%{bw.config-msg::error::no-permission}%"
- else if sender is console:
- if arg 2 is set:
- if {bw.arena.%arg 2%} is set:
- send "&a&l BLOCK WARS - Arena Check"
- send "&e> &f&l&nSetup Info:"
- if {bw.status.%arg 2%} is set:
- send "&e> &f&lStatus: &f%{bw.status.%arg 2%}%"
- else:
- send "&e> &f&lStatus: &8No set"
- if {bw.lobby.%arg 2%} is set:
- send "&e> &f&lLoc Lobby: &f%{bw.lobby.%arg 2%}%"
- else:
- send "&e> &f&lLoc Lobby: &8No set"
- if {bw.bluespawn.%arg 2%} is set:
- send "&e> &9&lBlue &f&lSpawn: &f%{bw.bluespawn.%arg 2%}%"
- else:
- send "&e> &9&lBlue &f&lSpawn: &8No set"
- if {bw.redspawn.%arg 2%} is set:
- send "&e> &4&lRed &f&lSpawn: &f%{bw.redspawn.%arg 2%}%"
- else:
- send "&e> &4&lRed &f&lSpawn: &8No set"
- if {bw.blueblock.%arg 2%} is set:
- send "&e> &9&lBlue &f&lFlag: &f%{bw.blueblock.%arg 2%}%"
- else:
- send "&e> &9&lBlue &f&lFlag: &8No set"
- if {bw.redblock.%arg 2%} is set:
- send "&e> &4&lRed &f&lFlag: &f%{bw.redblock.%arg 2%}%"
- else:
- send "&e> &4&lRed &f&lFlag: &8No set"
- if {bw.blue-villager.%arg 2%::location} is set:
- send "&e> &9&lBlue &f&lVillager Location: &f%{bw.blue-villager.%arg 2%::location}%"
- else:
- send "&e> &9&lBlue &f&lVillager Location: &8No set"
- if {bw.red-villager.%arg 2%::location} is set:
- send "&e> &4&lRed &f&lVillager Location: &f%{bw.red-villager.%arg 2%::location}%"
- else:
- send "&e> &4&lRed &f&lVillager Location: &8No set"
- if {bw.blue-villager.%arg 2%::id} is set:
- send "&e> &9&lBlue &f&lVillager Citizens ID: &f%{bw.blue-villager.%arg 2%::id}%"
- else:
- send "&e> &9&lBlue &f&lVillager Citizens ID: &8No set"
- if {bw.red-villager.%arg 2%::id} is set:
- send "&e> &4&lRed &f&lVillager Citizens ID: &f%{bw.red-villager.%arg 2%::id}%"
- else:
- send "&e> &4&lRed &f&lVillager Citizens ID: &8No set"
- send "&e> &f&l&nGame Info:"
- if {bw.phase.%arg 2%} is set:
- send "&e> &f&lPhase: &f%{bw.phase.%arg 2%}%"
- else:
- send "&e> &f&lPhase: &8No Definite"
- send "&e> &f&lPlayers Total Mount: &f%{bw.amountplayers.%arg 2%}%"
- send "&e> &f&lPlaying Players:"
- if size of {bw.players.%arg 2%::*} > 0:
- loop {bw.players.%arg 2%::*}:
- send " %loop-value%"
- else:
- send " &8No Players"
- send "&e> &f&l&nTeam Info:"
- if size of {bw.red-team.%arg 2%::*} > 0:
- send "&e> &4Red Players: &f%{bw.red-team.%arg 2%::*}%"
- else:
- send "&e> &4Red Players: &8No Players"
- if size of {bw.blue-team.%arg 2%::*} > 0:
- send "&e> &9Blue Players: &f%{bw.blue-team.%arg 2%::*}%"
- else:
- send "&e> &9Blue Players: &8No Players"
- else:
- send "&cThis game does not exist!"
- else:
- send "&cUse /blockwars check <arena>"
- if arg 1 is "edit":
- if sender is player:
- if player has permission "blockwars.admin":
- if arg 2 is set:
- if {bw.arena.%arg 2%} is set:
- if {bw.status.%arg 2%} is "Waiting" or "Starting":
- loop {bw.players.%arg 2%::*}:
- make loop-value execute command "/blockwars leave"
- send "%{bw.config::prefix}% &cThe game has been stopped!" to loop-value
- send "%{bw.config::prefix}% &fYou have activated edit mode of the game &2%arg 2% &fsuccessfully!"
- set {bw.status.%arg 2%} to "NotReady"
- else if {bw.status.%arg 2%} is "NotReady":
- send "%{bw.config::prefix}% &cEdit mode of this game is already activated!"
- else if {bw.status.%arg 2%} is "Rebuild":
- send "%{bw.config::prefix}% &cThis map is regenerating. You can not do this!"
- else if {bw.status.%arg 2%} is "Ingame":
- send "%{bw.config::prefix}% &cThis game is in progress!. Use /bw stop %arg 2% to stop."
- else:
- send "%{bw.config::prefix}% &cThis game does not exist!"
- else:
- send "%{bw.config::prefix}% &cUse /blockwars edit <arena>"
- else:
- send "%{bw.config::prefix}% &c%{bw.config-msg::error::no-permission}%"
- else if sender is console:
- send "%{bw.config::prefix}% &cThis command can only be executed by players!" to console
- if arg 1 is "save":
- if sender is player:
- if player has permission "blockwars.admin":
- if arg 2 is set:
- if {bw.arena.%arg 2%} is set:
- if {bw.status.%arg 2%} is "NotReady":
- if {bw.lobby.%arg 2%} is set:
- if {bw.wall-pos1.%arg 2%} is set:
- if {bw.wall-pos2.%arg 2%} is set:
- if {bw.bluespawn.%arg 2%} is set:
- if {bw.redspawn.%arg 2%} is set:
- if {bw.blueblock.%arg 2%} is set:
- if {bw.redblock.%arg 2%} is set:
- if {bw.blue-villager.%arg 2%::location} is set:
- if {bw.red-villager.%arg 2%::location} is set:
- send "%{bw.config::prefix}% &2&lMap blocks are to be stored below. You can look progress at action bar."
- set {_lag} to 0
- set {total} to 0
- wait 10 ticks
- loop blocks within {bw.map-pos1.%arg 2%} to {bw.map-pos2.%arg 2%}:
- if loop-block is not air:
- add 1 to {total}
- loop blocks within {bw.map-pos1.%arg 2%} to {bw.map-pos2.%arg 2%}:
- if loop-block is not air:
- set {bw.regen-blocks.%arg 2%::%location of loop-block%} to type of block at loop-block
- add 1 to {_blocks}
- add 1 to {_lag}
- set action bar of player to "&2Saving Blocks... (&8%{_blocks}%/%{total}%&2)"
- if {_lag} = 500:
- set {_lag} to 0
- wait 2 seconds
- set {bw.status.%arg 2%} to "Waiting"
- send "%{bw.config::prefix}% &fYou have saved the game &2%arg 2% &fsuccessfully!"
- else:
- send "%{bw.config::prefix}% &cYou have not set the villager. Use /blockwars check %arg 2% to check!"
- else:
- send "%{bw.config::prefix}% &cYou have not set the villager. Use /blockwars check %arg 2% to check!"
- else:
- send "%{bw.config::prefix}% &cYou have not set the flag. Use /blockwars check %arg 2% to check!"
- else:
- send "%{bw.config::prefix}% &cYou have not set the flag. Use /blockwars check %arg 2% to check!"
- else:
- send "%{bw.config::prefix}% &cYou have not set the spawn. Use /blockwars check %arg 2% to check!"
- else:
- send "%{bw.config::prefix}% &cYou have not set the spawn. Use /blockwars check %arg 2% to check!"
- else:
- send "%{bw.config::prefix}% &cYou have not set the wall. Use /blockwars check %arg 2% to check!"
- else:
- send "%{bw.config::prefix}% &cYou have not set the wall. Use /blockwars check %arg 2% to check!"
- else:
- send "%{bw.config::prefix}% &cYou have not established the lobby waiting. Use /blockwars check %arg 2% to check!"
- else:
- send "%{bw.config::prefix}% &cThis game is already saved, use /bw edit %arg 2% to do this."
- else:
- send "%{bw.config::prefix}% &cThis game does not exist!"
- else:
- send "%{bw.config::prefix}% &cUse /blockwars save <arena>"
- else:
- send "%{bw.config::prefix}% &c%{bw.config-msg::error::no-permission}%"
- else if sender is console:
- send "%{bw.config::prefix}% &cThis command can only be executed by players!" to console
- if arg 1 is "stop":
- if sender is player:
- if player has permission "blockwars.admin":
- if arg 2 is set:
- if {bw.arena.%arg 2%} is set:
- if {bw.status.%arg 2%} is not "NotReady":
- loop {bw.players.%arg 2%::*}:
- make loop-value execute command "/blockwars leave"
- send "&c%{bw.config-msg::error::stop-arena}%" to loop-value
- set {bw.status.%arg 2%} to "Rebuild"
- clear {bw.players.%arg 2%::*}
- clear {bw.blue-team.%arg 2%::*}
- clear {bw.red-team.%arg 2%::*}
- set {bw.amountplayers.%arg 2%} to 0
- set {_lag} to 0
- loop blocks within {bw.map-pos1.%arg 2%} to {bw.map-pos2.%arg 2%}:
- if {_lag} > 100:
- chance of 50%:
- wait {bw.config::rebuild-map-delay}
- else:
- wait 1.5 seconds
- set {_lag} to 0
- if {bw.regen-blocks.%arg 2%::%location of loop-block%} is not set:
- if loop-block is not air:
- add 1 to {_lag}
- set loop-block to air
- else:
- if type of loop-block is not {bw.regen-blocks.%arg 2%::%location of loop-block%}:
- add 1 to {_lag}
- set block at loop-block to {bw.regen-blocks.%arg 2%::%location of loop-block%}
- set {bw.status.%arg 2%} to "Waiting"
- set {bw.countdown-started?.%arg 2%} to false
- send "%{bw.config::prefix}% &fYou have stopped arena &2%arg 2% &fwith success!"
- else:
- send "%{bw.config::prefix}% &cThis game is not ready!"
- else:
- send "%{bw.config::prefix}% &cThis game does not exist!"
- else:
- send "%{bw.config::prefix}% &cUse /blockwars stop <arena>"
- else:
- send "%{bw.config::prefix}% &c%{bw.config-msg::error::no-permission}%"
- else if sender is console:
- if arg 2 is set:
- if {bw.arena.%arg 2%} is set:
- if {bw.status.%arg 2%} is not "NotReady":
- loop {bw.players.%arg 2%::*}:
- make loop-value execute command "/blockwars leave"
- set {bw.status.%arg 2%} to "Rebuild"
- clear {bw.players.%arg 2%::*}
- clear {bw.blue-team.%arg 2%::*}
- clear {bw.red-team.%arg 2%::*}
- set {bw.amountplayers.%arg 2%} to 0
- set {_lag} to 0
- loop blocks within {bw.map-pos1.%arg 2%} to {bw.map-pos2.%arg 2%}:
- if {_lag} > 100:
- chance of 50%:
- wait {bw.config::rebuild-map-delay}
- else:
- wait 1.5 seconds
- set {_lag} to 0
- if {bw.regen-blocks.%arg 2%::%location of loop-block%} is not set:
- if loop-block is not air:
- add 1 to {_lag}
- set loop-block to air
- else:
- if type of loop-block is not {bw.regen-blocks.%arg 2%::%location of loop-block%}:
- add 1 to {_lag}
- set block at loop-block to {bw.regen-blocks.%arg 2%::%location of loop-block%}
- set {bw.status.%arg 2%} to "Waiting"
- set {bw.countdown-started?.%arg 2%} to false
- send "&8You have stopped arena %arg 2% with success!" to console
- else:
- send "%{bw.config::prefix}% &cThis game is not ready!" to console
- else:
- send "%{bw.config::prefix}% &cThis game does not exist!" to console
- else:
- send "%{bw.config::prefix}% &cUse /blockwars stop <arena>" to console
- if arg 1 is "list":
- if sender is player:
- if player has permission "blockwars.admin":
- if size of {bw.arena-list::*} > 0:
- send "&2&l Block Wars - Arena List"
- loop {bw.arena-list::*}:
- send " &e> &f&l%loop-value-1% &8- &f%{bw.status.%loop-value-1%}%"
- else:
- send "&7&l Block Wars - Arena List"
- send "&7>> &8No games created!"
- else:
- send "&c%{bw.config-msg::error::no-permission}%"
- else if sender is console:
- if size of {bw.arena-list::*} > 0:
- send "&2&l Block Wars - Arena List"
- loop {bw.arena-list::*}:
- send " &e> &f&l%loop-value-1% &8- &f%{bw.status.%loop-value-1%}%"
- else:
- send "&7&l Block Wars - Arena List"
- send "&7>> &8No games created!"
- if arg 1 is "join":
- if sender is player:
- if player has permission "blockwars.user":
- if arg 2 is set:
- if {bw.%player%.ingame} and {bw.%player%.lobby} is false:
- if {bw.arena.%arg 2%} is true:
- if {bw.status.%arg 2%} is "Waiting" or "Starting":
- if {bw.amountplayers.%arg 2%} < {bw.playerperteam.%arg 2%}*2:
- set {bw.%player%.playing-arena} to arg 2
- set {bw.%player%.no-damage} to false
- wipe player's sidebar
- loop 37 times:
- set {_id} to loop-number
- remove 1 from {_id}
- set {bw.%player%.inv::%{_id}%} to slot {_id} of player's inventory
- set {bw.%player%.armor::helmet} to player's helmet
- set {bw.%player%.armor::chestplate} to player's chestplate
- set {bw.%player%.armor::leggings} to player's leggings
- set {bw.%player%.armor::boots} to player's boots
- wait 1 tick
- clear player's inventory
- set {_slot} to "%{bw.config::item::kit-item-slot}%" parsed as integer
- if {_slot} is not set:
- set {_slot} to 1
- set {_id} to "%{bw.config::item::kit-item-id}%" parsed as item
- if {_id} is not set:
- set {_id} to paper
- set {_name} to {bw.config::item::kit-item-name}
- set {_accion} to "set slot {_slot} of player to {_id} named ""%{_name}%"""
- evaluate {_accion}
- set {_slot} to "%{bw.config::item::team-item-slot}%" parsed as integer
- if {_slot} is not set:
- set {_slot} to 0
- set {_id} to "%{bw.config::item::team-item-id}%" parsed as item
- if {_id} is not set:
- set {_id} to nether star
- set {_name} to {bw.config::item::team-item-name}
- set {_accion} to "set slot {_slot} of player to {_id} named ""%{_name}%"""
- evaluate {_accion}
- set {_slot} to "%{bw.config::item::leave-item-slot}%" parsed as integer
- if {_slot} is not set:
- set {_slot} to 8
- set {_id} to "%{bw.config::item::leave-item-id}%" parsed as item
- if {_id} is not set:
- set {_id} to redstone
- set {_name} to {bw.config::item::leave-item-name}
- set {_accion} to "set slot {_slot} of player to {_id} named ""%{_name}%"""
- evaluate {_accion}
- remove mining fatigue and speed and haste and regeneration and slowness from player
- set hunger of player to 20
- set gamemode of player to survival
- heal the player
- set {bw.%player%.lobby} to true
- set {bw.%player%.ingame} to false
- set {bw.%player%.bandera} to false
- teleport player to {bw.lobby.%{bw.%player%.playing-arena}%}
- delete {bw.%player%.team}
- delete {bw.%player%.kit}
- add player to {bw.players.%{bw.%player%.playing-arena}%::*}
- loop {bw.players.%{bw.%player%.playing-arena}%::*}:
- invoke "bw-lobbyscoreboard" from loop-value
- set {bw.amountplayers.%{bw.%player%.playing-arena}%} to size of {bw.players.%{bw.%player%.playing-arena}%::*}
- set {_msg-join} to {bw.config-msg::listener::join-broad}
- set {_amount} to {bw.amountplayers.%{bw.%player%.playing-arena}%}
- set {_max} to {bw.playerperteam.%{bw.%player%.playing-arena}%}*2
- replace all "<player>" with "%player%" in {_msg-join}
- replace all "<amount>" with "%{_amount}%" in {_msg-join}
- replace all "<max>" with "%{_max}%" in {_msg-join}
- send "&f%{_msg-join}%" to {bw.players.%{bw.%player%.playing-arena}%::*}
- if {bw.amountplayers.%{bw.%player%.playing-arena}%} >= {bw.minplayers.%{bw.%player%.playing-arena}%}:
- set {bw.status.%{bw.%player%.playing-arena}%} to "Starting"
- if {bw.countdown-started?.%{bw.%player%.playing-arena}%} is false:
- set {bw.countdown.%{bw.%player%.playing-arena}%} to {bw.config::config::countdown}
- set {bw.countdown-started?.%{bw.%player%.playing-arena}%} to true
- loop {bw.countdown.%{bw.%player%.playing-arena}%} times:
- if size of {bw.players.%{bw.%player%.playing-arena}%::*} is more than or equal to {bw.minplayers.%{bw.%player%.playing-arena}%}:
- if {bw.countdown.%{bw.%player%.playing-arena}%} <= 0:
- stop loop
- if {bw.countdown.%{bw.%player%.playing-arena}%} is less than or equal to 5:
- set {_msg-countdown} to {bw.config-msg::game::countdown-msg}
- set {_time} to {bw.countdown.%{bw.%player%.playing-arena}%}
- replace all "<time>" with "%{_time}%" in {_msg-countdown}
- send "&f%{_msg-countdown}%" to {bw.players.%{bw.%player%.playing-arena}%::*}
- set level of {bw.players.%{bw.%player%.playing-arena}%::*} to {bw.countdown.%{bw.%player%.playing-arena}%}
- play raw sound "random.pop" at {bw.players.%{bw.%player%.playing-arena}%::*} with pitch 1 volume 10
- wait 1 seconds
- remove 1 from {bw.countdown.%{bw.%player%.playing-arena}%}
- else:
- set {_msg-countdown} to {bw.config-msg::game::countdown-msg}
- set {_time} to {bw.countdown.%{bw.%player%.playing-arena}%}
- replace all "<time>" with "%{_time}%" in {_msg-countdown}
- send "&f%{_msg-countdown}%" to {bw.players.%{bw.%player%.playing-arena}%::*}
- set level of {bw.players.%{bw.%player%.playing-arena}%::*} to {bw.countdown.%{bw.%player%.playing-arena}%}
- wait 1 seconds
- remove 1 from {bw.countdown.%{bw.%player%.playing-arena}%}
- else:
- send "&c%{bw.config-msg::error::no-min-players}%" to {bw.players.%{bw.%player%.playing-arena}%::*}
- set {bw.status.%{bw.%player%.playing-arena}%} to "Waiting"
- set {bw.countdown-started?.%{bw.%player%.playing-arena}%} to false
- set level of {bw.players.%{bw.%player%.playing-arena}%::*} to 0
- set level progress of {bw.players.%{bw.%player%.playing-arena}%::*} to 0.0
- wait 1 tick
- stop
- if {bw.countdown.%{bw.%player%.playing-arena}%} is less than or equal to 1:
- set {bw.status.%{bw.%player%.playing-arena}%} to "Ingame"
- set {bw.countdown.%{bw.%player%.playing-arena}%} to {bw.config::config::countdown}
- set {bw.countdown-started?.%{bw.%player%.playing-arena}%} to false
- loop {bw.players.%{bw.%player%.playing-arena}%::*}:
- add 1 to {bw.stats.games-played::%loop-value%}
- set {bw.%loop-value%.lobby} to false
- set {bw.%loop-value%.ingame} to true
- invoke "bw-give-rewards" from loop-value and "participation"
- set {bw.redpoints.%{bw.%player%.playing-arena}%} to 0
- set {bw.bluepoints.%{bw.%player%.playing-arena}%} to 0
- set {_jugadores::*} to {bw.players.%{bw.%player%.playing-arena}%::*}
- loop {bw.players.%{bw.%player%.playing-arena}%::*}:
- set {_jugadores::%loop-value%} to loop-value
- loop size of {_jugadores::*} times:
- set {_player} to random element of {_jugadores::*}
- remove {_player} from {_jugadores::*}
- delete {_jugadores::%{_player}%}
- if {bw.%{_player}%.team} is not set:
- if size of {bw.red-team.%{bw.%player%.playing-arena}%::*} is less than {bw.playerperteam.%{bw.%player%.playing-arena}%}:
- set {bw.%{_player}%.team} to "red"
- add {_player} to {bw.red-team.%{bw.%player%.playing-arena}%::*}
- send "&a%{bw.config-msg::game::jointeam-red}%" to {_player}
- teleport {_player} to {bw.redspawn.%{bw.%player%.playing-arena}%}
- clear {_player}'s inventory
- give 64 red clay to {_player}
- give 8 red clay to {_player}
- give diamond pickaxe to {_player}
- else if size of {bw.blue-team.%{bw.%player%.playing-arena}%::*} is less than {bw.playerperteam.%{bw.%player%.playing-arena}%}:
- set {bw.%{_player}%.team} to "blue"
- add {_player} to {bw.blue-team.%{bw.%player%.playing-arena}%::*}
- send "&a%{bw.config-msg::game::jointeam-blue}%" to {_player}
- teleport {_player} to {bw.bluespawn.%{bw.%player%.playing-arena}%}
- clear {_player}'s inventory
- give 64 blue clay to {_player}
- give 8 blue clay to {_player}
- give diamond pickaxe to {_player}
- else:
- if {bw.%{_player}%.team} is "red":
- teleport {_player} to {bw.redspawn.%{bw.%player%.playing-arena}%}
- clear {_player}'s inventory
- give 64 red clay to {_player}
- give 8 red clay to {_player}
- give diamond pickaxe to {_player}
- else if {bw.%{_player}%.team} is "blue":
- teleport {_player} to {bw.bluespawn.%{bw.%player%.playing-arena}%}
- clear {_player}'s inventory
- give 64 blue clay to {_player}
- give 8 blue clay to {_player}
- give diamond pickaxe to {_player}
- set level of {bw.players.%{bw.%player%.playing-arena}%::*} to 0
- set level progress of {bw.players.%{bw.%player%.playing-arena}%::*} to 0.0
- send "&6%{bw.config-msg::game::phasestart-build}%" to {bw.players.%{bw.%player%.playing-arena}%::*}
- #make {bw.red-team.%{bw.%player%.playing-arena}%::*} see {bw.blue-team.%{bw.%player%.playing-arena}%::*}'s prefix as "&9"
- #make {bw.blue-team.%{bw.%player%.playing-arena}%::*} see {bw.red-team.%{bw.%player%.playing-arena}%::*}'s prefix as "&c"
- #loop {bw.red-team.%{bw.%player%.playing-arena}%::*}:
- #make loop-value see {bw.red-team.%{bw.%player%.playing-arena}%::*}'s prefix as "&c"
- #loop {bw.blue-team.%{bw.%player%.playing-arena}%::*}:
- #make loop-value see {bw.blue-team.%{bw.%player%.playing-arena}%::*}'s prefix as "&9"
- set {bw.phase.%{bw.%player%.playing-arena}%} to "build"
- set {bw.time.%{bw.%player%.playing-arena}%} to 3 minutes
- loop 180 times:
- if {bw.status.%{bw.%player%.playing-arena}%} is "Ingame":
- loop {bw.players.%{bw.%player%.playing-arena}%::*}:
- set {_sb} to loop-value-2
- invoke "bw-ingamescoreboard" from {_sb}
- remove 1 seconds from {bw.time.%{bw.%player%.playing-arena}%}
- wait 1 seconds
- else:
- stop trigger
- set {bw.phase.%{bw.%player%.playing-arena}%} to "figth"
- set {bw.time.%{bw.%player%.playing-arena}%} to 7 minutes
- send "&6%{bw.config-msg::game::phasestart-figth}%" to {bw.players.%{bw.%player%.playing-arena}%::*}
- loop blocks within {bw.wall-pos1.%{bw.%player%.playing-arena}%} to {bw.wall-pos2.%{bw.%player%.playing-arena}%}:
- set loop-block to air
- loop {bw.players.%{bw.%player%.playing-arena}%::*}:
- set {_p} to loop-value
- clear {_p}'s inventory
- if {bw.config::config::regeneration-effect} is "true":
- apply regeneration 1 to {_p} for 999 days
- apply mining fatigue 1 to {_p} for 999 days
- teleport {_p} to {bw.%{bw.%{_p}%.team}%spawn.%{bw.%player%.playing-arena}%}
- invoke "bw-give-kits" from {_p} and {bw.%{_p}%.kit}
- loop 420 times:
- if {bw.status.%{bw.%player%.playing-arena}%} is "Ingame":
- loop {bw.players.%{bw.%player%.playing-arena}%::*}:
- set {_sb} to loop-value-2
- invoke "bw-ingamescoreboard" from {_sb}
- remove 1 seconds from {bw.time.%{bw.%player%.playing-arena}%}
- wait 1 seconds
- else:
- stop trigger
- if {bw.redpoints.%{bw.%player%.playing-arena}%} > {bw.bluepoints.%{bw.%player%.playing-arena}%}:
- send "%{bw.config-msg::win::red-win}%" to {bw.players.%{bw.%player%.playing-arena}%::*}
- loop {bw.red-team.%{bw.%player%.playing-arena}%::*}:
- add 1 to {bw.stats.wins::%loop-value%}
- invoke "bw-give-rewards" from loop-value and "win"
- loop {bw.players.%{bw.%player%.playing-arena}%::*}:
- invoke "bw-endgame" from loop-value
- loop 20 times:
- spawn firework at {bw.red-team.%{bw.%player%.playing-arena}%::*}
- wait 8 ticks
- else if {bw.bluepoints.%{bw.%player%.playing-arena}%} > {bw.redpoints.%{bw.%player%.playing-arena}%}:
- send "%{bw.config-msg::win::blue-win}%" to {bw.players.%{bw.%player%.playing-arena}%::*}
- loop {bw.blue-team.%{bw.%player%.playing-arena}%::*}:
- add 1 to {bw.stats.wins::%loop-value%}
- invoke "bw-give-rewards" from loop-value and "win"
- loop {bw.players.%{bw.%player%.playing-arena}%::*}:
- invoke "bw-endgame" from loop-value
- loop 20 times:
- spawn firework at {bw.blue-team.%{bw.%player%.playing-arena}%::*}
- wait 8 ticks
- else if {bw.bluepoints.%{bw.%player%.playing-arena}%} = {bw.redpoints.%{bw.%player%.playing-arena}%}:
- set {bw.phase.%{bw.%player%.playing-arena}%} to "overtime"
- set {bw.time.%{bw.%player%.playing-arena}%} to 2 minutes
- set {_lag} to 0
- loop blocks within {bw.map-pos1.%{bw.%player%.playing-arena}%} to {bw.map-pos2.%{bw.%player%.playing-arena}%}:
- if {_lag} > 50:
- wait 1 seconds
- set {_lag} to 0
- if {bw.regen-blocks.%{bw.%player%.playing-arena}%::%location of loop-block%} is not set:
- if loop-block is not air:
- set loop-block to air
- add 1 to {_lag}
- send "&6%{bw.config-msg::game::phasestart-overtime}%" to {bw.players.%{bw.%player%.playing-arena}%::*}
- loop 120 times:
- if {bw.status.%{bw.%player%.playing-arena}%} is "Ingame":
- loop {bw.players.%{bw.%player%.playing-arena}%::*}:
- set {_sb} to loop-value-2
- invoke "bw-ingamescoreboard" from {_sb}
- remove 1 seconds from {bw.time.%{bw.%player%.playing-arena}%}
- wait 1 seconds
- else:
- stop trigger
- set {_arena} to {bw.%player%.playing-arena}
- make console execute command "/blockwars stop %{_arena}%"
- if {bw.redpoints.%{bw.%player%.playing-arena}%} > {bw.bluepoints.%{bw.%player%.playing-arena}%}:
- send "%{bw.config-msg::win::red-win}%" to {bw.players.%{bw.%player%.playing-arena}%::*}
- loop {bw.red-team.%{bw.%player%.playing-arena}%::*}:
- add 1 to {bw.stats.wins::%loop-value%}
- invoke "bw-give-rewards" from loop-value and "win"
- loop {bw.players.%{bw.%player%.playing-arena}%::*}:
- invoke "bw-endgame" from loop-value
- loop 20 times:
- spawn firework at {bw.red-team.%{bw.%player%.playing-arena}%::*}
- wait 8 ticks
- else if {bw.bluepoints.%{bw.%player%.playing-arena}%} > {bw.redpoints.%{bw.%player%.playing-arena}%}:
- send "%{bw.config-msg::win::blue-win}%" to {bw.players.%{bw.%player%.playing-arena}%::*}
- loop {bw.blue-team.%{bw.%player%.playing-arena}%::*}:
- add 1 to {bw.stats.wins::%loop-value%}
- invoke "bw-give-rewards" from loop-value and "win"
- loop {bw.players.%{bw.%player%.playing-arena}%::*}:
- invoke "bw-endgame" from loop-value
- loop 20 times:
- spawn firework at {bw.blue-team.%{bw.%player%.playing-arena}%::*}
- wait 8 ticks
- else if {bw.bluepoints.%{bw.%player%.playing-arena}%} = {bw.redpoints.%{bw.%player%.playing-arena}%}:
- send "%{bw.config-msg::win::tie-game}%" to {bw.players.%{bw.%player%.playing-arena}%::*}
- wait 5 seconds
- loop {bw.players.%{bw.%player%.playing-arena}%::*}:
- make loop-value execute command "/bw leave"
- wait 1 seconds
- make console execute command "/bw stop %{bw.%player%.playing-arena}%"
- else:
- send "%{bw.config::prefix}% &c%{bw.config-msg::error::full-game}%"
- else:
- send "%{bw.config::prefix}% &c%{bw.config-msg::error::not-available}%"
- else:
- send "%{bw.config::prefix}% &c%{bw.config-msg::error::not-exist}%"
- else:
- send "%{bw.config::prefix}% &c%{bw.config-msg::error::ingame}%"
- else:
- send "%{bw.config::prefix}% &cUse /blockwars join <arena>"
- else:
- send "%{bw.config::prefix}% &c%{bw.config-msg::error::no-permission}%"
- else if sender is console:
- send "%{bw.config::prefix}% &cThis command can only be executed by players!" to console
- if arg 1 is "leave":
- if sender is player:
- if {bw.%player%.ingame} or {bw.%player%.lobby} is true:
- wipe player's sidebar
- set {bw.%player%.no-damage} to false
- #loop all players:
- #make loop-players see player's prefix as "&f"
- #make player see loop-players's prefix as "&f"
- set {bw.%player%.lobby} to false
- set {bw.%player%.ingame} to false
- set {bw.%player%.bandera} to false
- remove player from {bw.%{bw.%player%.team}%-team.%{bw.%player%.playing-arena}%::*}
- delete {bw.%{bw.%player%.team}%-team.%{bw.%player%.playing-arena}%::%player%}
- remove player from {bw.players.%{bw.%player%.playing-arena}%::*}
- loop {bw.players.%{bw.%player%.playing-arena}%::*}:
- invoke "bw-lobbyscoreboard" from loop-value
- set {bw.amountplayers.%{bw.%player%.playing-arena}%} to size of {bw.players.%{bw.%player%.playing-arena}%::*}
- if {bw.status.%{bw.%player%.playing-arena}%} is "Ingame":
- set {_msg-leave} to {bw.config-msg::listener::leave-broad-ingame}
- set {_amount} to {bw.amountplayers.%{bw.%player%.playing-arena}%}
- set {_max} to {bw.playerperteam.%{bw.%player%.playing-arena}%}*2
- replace all "<player>" with "%player%" in {_msg-leave}
- replace all "<amount>" with "%{_amount}%" in {_msg-leave}
- replace all "<max>" with "%{_max}%" in {_msg-leave}
- else:
- set {_msg-leave} to {bw.config-msg::listener::leave-broad-lobby}
- set {_amount} to {bw.amountplayers.%{bw.%player%.playing-arena}%}
- set {_max} to {bw.playerperteam.%{bw.%player%.playing-arena}%}*2
- replace all "<player>" with "%player%" in {_msg-leave}
- replace all "<amount>" with "%{_amount}%" in {_msg-leave}
- replace all "<max>" with "%{_max}%" in {_msg-leave}
- if {_msg-leave} is set:
- send "&f%{_msg-leave}%" to {bw.players.%{bw.%player%.playing-arena}%::*}
- else:
- send "&6%player% &eleft the game!" to {bw.players.%{bw.%player%.playing-arena}%::*}
- set {_arena} to {bw.%player%.playing-arena}
- clear player's inventory
- if {bw.mainlobby} is set:
- teleport player to {bw.mainlobby}
- else:
- teleport player to spawn
- wait 1 tick
- loop 37 times:
- set {_id} to loop-number
- remove 1 from {_id}
- set slot {_id} of player's inventory to {bw.%player%.inv::%{_id}%}
- set the helmet of player to {bw.%player%.armor::helmet}
- set the chestplate of player to {bw.%player%.armor::chestplate}
- set the leggings of player to {bw.%player%.armor::leggings}
- set the boots of player to {bw.%player%.armor::boots}
- set hunger of player to 20
- set level of player to 0
- remove mining fatigue and speed and haste and regeneration and slowness from player
- heal the player
- set {_arena} to {bw.%player%.playing-arena}
- if {bw.status.%{_arena}%} is "Ingame":
- if {bw.%player%.team} is "red":
- if size of {bw.red-team.%{_arena}%::*} < 1:
- send "%{bw.config-msg::win::blue-win}%" to {bw.players.%{_arena}%::*}
- loop {bw.blue-team.%{bw.%player%.playing-arena}%::*}:
- add 1 to {bw.stats.wins::%loop-value%}
- invoke "bw-give-rewards" from loop-value and "win"
- loop {bw.players.%{_arena}%::*}:
- invoke "bw-endgame" from loop-value
- loop 20 times:
- spawn firework at {bw.blue-team.%{bw.%player%.playing-arena}%::*}
- wait 8 ticks
- wait 1 seconds
- make console execute command "/blockwars stop %{_arena}%"
- else if {bw.%player%.team} is "blue":
- if size of {bw.blue-team.%{_arena}%::*} < 1:
- send "%{bw.config-msg::win::red-win}%" to {bw.players.%{_arena}%::*}
- loop {bw.red-team.%{bw.%player%.playing-arena}%::*}:
- add 1 to {bw.stats.wins::%loop-value%}
- invoke "bw-give-rewards" from loop-value and "win"
- loop {bw.players.%{_arena}%::*}:
- invoke "bw-endgame" from loop-value
- loop 20 times:
- spawn firework at {bw.red-team.%{_arena}%::*}
- wait 8 ticks
- wait 1 seconds
- make console execute command "/blockwars stop %{_arena}%"
- else if {bw.status.%{_arena}%} is "Waiting" or "Starting":
- if size of {bw.players.%{_arena}%::*} < {bw.minplayers.%{_arena}%}:
- set {bw.status.%{_arena}%} to "Waiting"
- set {bw.countdown-started?.%{_arena}%} to false
- wait 5 tick
- invoke "bw-stats-hologram-update" from player
- delete {bw.%player%.team}
- delete {bw.%player%.kit}
- delete {bw.%player%.playing-arena}
- if {bw.status.%{_arena}%} is "Ingame":
- if size of {bw.players.%{_arena}%::*} < 1:
- make console execute command "/blockwars stop %{_arena}%"
- else:
- send "%{bw.config::prefix}% &c%{bw.config-msg::error::no-ingame}%"
- else if sender is console:
- send "%{bw.config::prefix}% &cThis command can only be executed by players!" to console
- on command:
- if command is {bw.config::leave-cmd}:
- cancel event
- make sender execute command "/blockwars leave"
- on join:
- if {bw.stats.wins::%player%} is not set:
- set {bw.stats.wins::%player%} to 0
- if {bw.stats.kills::%player%} is not set:
- set {bw.stats.kills::%player%} to 0
- if {bw.stats.deaths::%player%} is not set:
- set {bw.stats.deaths::%player%} to 0
- if {bw.stats.flags-captured::%player%} is not set:
- set {bw.stats.flags-captured::%player%} to 0
- if {bw.stats.games-played::%player%} is not set:
- set {bw.stats.games-played::%player%} to 0
- if {bw.stats.arrow-shoot::%player%} is not set:
- set {bw.stats.arrow-shoot::%player%} to 0
- if {bw.stats.arrow-hit::%player%} is not set:
- set {bw.stats.arrow-hit::%player%} to 0
- if {bw.stats.block-bloken::%player%} is not set:
- set {bw.stats.block-bloken::%player%} to 0
- if {bw.stats.block-placed::%player%} is not set:
- set {bw.stats.block-placed::%player%} to 0
- on join:
- if {bw.loc-holo} is set:
- set {_stats.holo} to {bw.config::hologram::stats-holo}
- replace all "<wins>" with "%{bw.stats.wins::%player%}%" in {_stats.holo}
- replace all "<kills>" with "%{bw.stats.kills::%player%}%" in {_stats.holo}
- replace all "<deaths>" with "%{bw.stats.deaths::%player%}%" in {_stats.holo}
- replace all "<flags-captured>" with "%{bw.stats.flags-captured::%player%}%" in {_stats.holo}
- replace all "<games-played>" with "%{bw.stats.games-played::%player%}%" in {_stats.holo}
- replace all "<arrow-shot>" with "%{bw.stats.arrow-shoot::%player%}%" in {_stats.holo}
- replace all "<arrow-hit>" with "%{bw.stats.arrow-hit::%player%}%" in {_stats.holo}
- replace all "<block-bloken>" with "%{bw.stats.block-bloken::%player%}%" in {_stats.holo}
- replace all "<block-placed>" with "%{bw.stats.block-placed::%player%}%" in {_stats.holo}
- replace all "<player>" with "%player%" in {_stats.holo}
- replace all "//" with ";" in {_stats.holo}
- evaluate "create interactive client side holo object ""%coloured {_stats.holo}%"" with id ""bw.%player%.holo-stats"" at {bw.loc-holo} to player"
- on quit:
- evaluate "delete holo object ""bw.%player%.holo-stats"""
- on rightclick on anything:
- if {bw.%player%.lobby} is true:
- if tool of player is not air:
- set {_name.kit} to "%{bw.config::item::kit-item-name}%"
- set {_name.team} to "%{bw.config::item::team-item-name}%"
- set {_name.leave} to "%{bw.config::item::leave-item-name}%"
- if name of tool of player is {_name.kit}:
- invoke "bw-gui-kits" from player
- if name of tool of player is {_name.team}:
- invoke "bw-team-gui" from player
- if name of tool of player is {_name.leave}:
- make player execute command "/blockwars leave"
- send "&7%{bw.config::prefix}% &f%{bw.config-msg::listener::leave-msg}%"
- on npc right click:
- if {bw.%player%.ingame} is true:
- invoke "bw-gui-kits" from player
- on damage of player:
- if {bw.%victim%.ingame} is true:
- if "%damage cause%" is "projectile":
- add 1 to {bw.stats.arrow-hit::%victim%}
- on join:
- set {bw.%player%.ingame} to false
- set {bw.%player%.lobby} to false
- set {bw.%player%.bandera} to false
- set {bw.%player%.no-damage} to false
- delete {bw.%player%.team}
- on quit:
- if {bw.%player%.ingame} or {bw.%player%.lobby} is true:
- make player execute command "/blockwars leave"
- set {bw.%player%.ingame} to false
- set {bw.%player%.lobby} to false
- set {bw.%player%.bandera} to false
- set {bw.%player%.no-damage} to false
- delete {bw.%player%.team}
- on shoot:
- if {bw.%shooter%.ingame} is true:
- if projectile is a arrow:
- add 1 to {bw.stats.arrow-shoot::%shooter%}
- on place:
- if {bw.%player%.ingame} is true:
- add 1 to {bw.stats.block-placed::%player%}
- if event-block is wool:
- cancel event
- on drop:
- if {bw.%player%.lobby} is true:
- cancel event
- if {bw.%player%.ingame} is true:
- cancel event
- on damage:
- if {bw.%victim%.lobby} is true:
- cancel event
- on break:
- if {bw.%player%.lobby} is true:
- cancel event
- on place:
- if {bw.%player%.lobby} is true:
- cancel event
- on pick up:
- if {bw.%player%.lobby} is true:
- cancel event
- on hunger bar change:
- if {bw.%player%.lobby} is true:
- set hunger bar of player to 20
- if {bw.%player%.ingame} is true:
- set hunger bar of player to 20
- on inventory click:
- if {bw.%player%.lobby} is true:
- cancel event
- if {bw.%player%.ingame} is true:
- cancel event
- on chat:
- if {bw.%player%.ingame} is true:
- if {bw.%player%.no-damage} is false:
- if {bw.status.%{bw.%player%.playing-arena}%} is "Ingame":
- cancel event
- if first character of message is "!" or "@":
- set {_msg} to "%subtext of message from characters 2 to (length of message)%"
- set {_format} to {bw.config::chat::global-chat}
- replace all "<player>" with "%player%" in {_format}
- replace all "<msg>" with "%{_msg}%" in {_format}
- send "%{_format}%" to {bw.players.%{bw.%player%.playing-arena}%::*}
- else:
- set {_format} to {bw.config::chat::team-chat}
- replace all "<player>" with "%player%" in {_format}
- replace all "<msg>" with "%message%" in {_format}
- send "%{_format}%" to {bw.%{bw.%player%.team}%-team.%{bw.%player%.playing-arena}%::*}
- else:
- cancel event
- set {_format} to {bw.config::chat::lobby-chat}
- replace all "<player>" with "%player%" in {_format}
- replace all "<msg>" with "%message%" in {_format}
- send "&7%{_format}%" to {bw.players.%{bw.%player%.playing-arena}%::*}
- on damage of player:
- if {bw.%victim%.no-damage} is true:
- cancel event
- on break:
- if {bw.%player%.no-damage} is true:
- cancel event
- on damage of player:
- if {bw.%victim%.ingame} is true:
- if {bw.phase.%{bw.%victim%.playing-arena}%} is "build":
- if damage was caused by void:
- cancel event
- teleport victim to {bw.%{bw.%victim%.team}%spawn.%{bw.%victim%.playing-arena}%}
- else:
- cancel event
- on place:
- if {bw.%player%.ingame} is true:
- loop all blocks in radius 1.8 around event-block:
- if location of loop-block is {bw.redblock.%{bw.%player%.playing-arena}%} or {bw.blueblock.%{bw.%player%.playing-arena}%} or {bw.%{bw.%player%.team}%spawn.%{bw.%player%.playing-arena}%} or {bw.%{bw.%player%.team}%-villager.%{bw.%player%.playing-arena}%::location}:
- send "&c%{bw.config-msg::error::no-build}%"
- cancel event
- on break:
- if {bw.%player%.ingame} is true:
- if location of event-block is not {bw.blueblock.%{bw.%player%.playing-arena}%} or {bw.redblock.%{bw.%player%.playing-arena}%}:
- if {bw.regen-blocks.%{bw.%player%.playing-arena}%::%location of event-block%} is set:
- cancel event
- send "&c%{bw.config-msg::error::no-break}%"
- else:
- add 1 to {bw.stats.block-bloken::%player%}
- if event-block is not red wool or blueglass or blue wool or redglass:
- if tool of player is wood pickaxe:
- set block at event-block to air
- on break:
- if location of event-block is {bw.blueblock.%{bw.%player%.playing-arena}%} or {bw.redblock.%{bw.%player%.playing-arena}%}:
- cancel event
- if {bw.phase.%{bw.%player%.playing-arena}%} is "figth" or "overtime":
- add 1 to {bw.stats.flags-captured::%player%}
- invoke "bw-give-rewards" from player and "capture"
- if event-block is red wool:
- if {bw.%player%.team} is "red":
- send "&c%{bw.config-msg::error::capture-own-flag}%"
- cancel event
- else if {bw.%player%.team} is "blue":
- cancel event
- set block at event-block to blueglass
- set slot 8 of player's inventory to red wool named "&6Red Flag"
- set {bw.%player%.bandera} to true
- set the helmet of player to brojo
- apply slowness 2 to player for 999 days
- set {_msg-flagtaken} to {bw.config-msg::game::flag-taken}
- set {_msg-ftaken::*} to coloured {_msg-flagtaken} split at "//"
- set {_team} to "&cRed"
- replace all "<team>" with "%{_team}%" in {_msg-ftaken::2}
- replace all "<player>" with "&9%player%" in {_msg-ftaken::2}
- loop {bw.red-team.%{bw.%player%.playing-arena}%::*}:
- set {_p} to loop-value
- send {_p} title "&c&l%{_msg-ftaken::1}%" with subtitle "%{_msg-ftaken::2}%" for 5 seconds
- loop {bw.blue-team.%{bw.%player%.playing-arena}%::*}:
- set {_p} to loop-value
- send {_p} title "&a&l%{_msg-ftaken::1}%" with subtitle "%{_msg-ftaken::2}%" for 5 seconds
- if event-block is blue wool:
- if {bw.%player%.team} is "blue":
- send "&c%{bw.config-msg::error::capture-own-flag}%"
- cancel event
- else if {bw.%player%.team} is "red":
- cancel event
- set block at event-block to redglass
- set slot 8 of player's inventory to blue wool named "&6Blue Flag"
- set {bw.%player%.bandera} to true
- set the helmet of player to bazul
- apply slowness 2 to player for 999 days
- set {_msg-flagtaken} to {bw.config-msg::game::flag-taken}
- set {_msg-ftaken::*} to coloured {_msg-flagtaken} split at "//"
- set {_team} to "&9Blue"
- replace all "<team>" with "%{_team}%" in {_msg-ftaken::2}
- replace all "<player>" with "&c%player%" in {_msg-ftaken::2}
- loop {bw.blue-team.%{bw.%player%.playing-arena}%::*}:
- set {_p} to loop-value
- send {_p} title "&c&l%{_msg-ftaken::1}%" with subtitle "%{_msg-ftaken::2}%" for 5 seconds
- loop {bw.red-team.%{bw.%player%.playing-arena}%::*}:
- set {_p} to loop-value
- send {_p} title "&a&l%{_msg-ftaken::1}%" with subtitle "%{_msg-ftaken::2}%" for 5 seconds
- if event-block is redglass:
- cancel event
- if event-block is blueglass:
- cancel event
- else if {bw.phase.%{bw.%player%.playing-arena}%} is "build":
- cancel event
- on damage of player:
- if {bw.%victim%.ingame} is true:
- if {bw.phase.%{bw.%victim%.playing-arena}%} is "figth" or "overtime":
- if damage is greater than or equal to health of victim:
- add 1 to {bw.stats.deaths::%victim%}
- if attacker is set:
- set {_msg-kill} to {bw.config-msg::pvp::kill-player}
- replace all "<victim>" with "<%{bw.%victim%.team}%>%victim%" in {_msg-kill}
- replace all "<attacker>" with "<%{bw.%attacker%.team}%>%attacker%" in {_msg-kill}
- send "%{_msg-kill}%" to {bw.players.%{bw.%victim%.playing-arena}%::*}
- add 1 to {bw.stats.kills::%attacker%}
- invoke "bw-give-rewards" from attacker and "kill"
- else:
- set {_msg-died} to {bw.config-msg::pvp::death-player}
- replace all "<victim>" with "<%{bw.%victim%.team}%>%victim%" in {_msg-died}
- send "%{_msg-died}%" to {bw.players.%{bw.%victim%.playing-arena}%::*}
- heal victim
- cancel event
- remove slowness from victim
- if {bw.config::config::regeneration-effect} is "true":
- apply regeneration 1 to victim for 999 days
- apply mining fatigue 1 to victim for 999 days
- if {bw.%victim%.bandera} is true:
- if attacker is set:
- invoke "bw-give-rewards" from attacker and "dropped"
- set {bw.%victim%.bandera} to false
- if {bw.%victim%.team} is "red":
- set block at {bw.blueblock.%{bw.%victim%.playing-arena}%} to blue wool
- set {_msg-flagdropped} to {bw.config-msg::game::flag-dropped}
- set {_msg-fdropped::*} to coloured {_msg-flagdropped} split at "//"
- set {_team} to "&9Blue"
- replace all "<team>" with "%{_team}%" in {_msg-fdropped::2}
- replace all "<player>" with "&c%victim%" in {_msg-fdropped::2}
- loop {bw.red-team.%{bw.%victim%.playing-arena}%::*}:
- set {_p} to loop-value
- send {_p} title "&4&l%{_msg-fdropped::1}%" with subtitle "%{_msg-fdropped::2}%" for 5 seconds
- loop {bw.blue-team.%{bw.%victim%.playing-arena}%::*}:
- set {_p} to loop-value
- send {_p} title "&2&l%{_msg-fdropped::1}%" with subtitle "%{_msg-fdropped::2}%" for 5 seconds
- if {bw.%victim%.team} is "blue":
- set block at {bw.redblock.%{bw.%victim%.playing-arena}%} to red wool
- set {_msg-flagdropped} to {bw.config-msg::game::flag-dropped}
- set {_msg-fdropped::*} to coloured {_msg-flagdropped} split at "//"
- set {_team} to "&cRed"
- replace all "<team>" with "%{_team}%" in {_msg-fdropped::2}
- replace all "<player>" with "&9%victim%" in {_msg-fdropped::2}
- loop {bw.red-team.%{bw.%victim%.playing-arena}%::*}:
- set {_p} to loop-value
- send {_p} title "&2&l%{_msg-fdropped::1}%" with subtitle "%{_msg-fdropped::2}%" for 5 seconds
- loop {bw.blue-team.%{bw.%victim%.playing-arena}%::*}:
- set {_p} to loop-value
- send {_p} title "&4&l%{_msg-fdropped::1}%" with subtitle "%{_msg-fdropped::2}%" for 5 seconds
- teleport victim to {bw.%{bw.%victim%.team}%spawn.%{bw.%victim%.playing-arena}%}
- clear victim's inventory
- set gamemode of victim to spectator
- set {_seg} to 10
- loop {_seg} times:
- set {_msg-respawn-screen} to {bw.config-msg::pvp::respawn-screen}
- replace all "<time>" with "%{_seg}%" in {_msg-respawn-screen}
- send victim title "" with subtitle "%{_msg-respawn-screen}%" for 1 seconds
- remove 1 from {_seg}
- wait 1 seconds
- set gamemode of victim to survival
- invoke "bw-give-kits" from victim and {bw.%victim%.kit}
- teleport victim to {bw.%{bw.%victim%.team}%spawn.%{bw.%victim%.playing-arena}%}
- on damage of player:
- if attacker is set:
- if {bw.%victim%.playing-arena} = {bw.%attacker%.playing-arena}:
- if {bw.%victim%.team} = {bw.%attacker%.team}:
- cancel event
- send "&c%{bw.config-msg::error::damage-own-team}%" to attacker
- on rightclick:
- if {bw.%player%.bandera} is true:
- if {bw.phase.%{bw.%player%.playing-arena}%} is "figth":
- if clicked block is red wool or blueglass:
- if {bw.%player%.team} is "red":
- add 1 to {bw.redpoints.%{bw.%player%.playing-arena}%}
- set slot 8 of player's inventory to air
- set block at {bw.blueblock.%{bw.%player%.playing-arena}%} to blue wool
- set the helmet of player to leather helmet
- remove slowness from player
- set {bw.%player%.bandera} to false
- set {_msg-flagcaptured} to {bw.config-msg::game::flag-captured}
- set {_msg-fcaptured::*} to coloured {_msg-flagcaptured} split at "//"
- set {_team} to "&9Blue"
- replace all "<team>" with "%{_team}%" in {_msg-fcaptured::2}
- replace all "<player>" with "&c%player%" in {_msg-fcaptured::2}
- loop {bw.red-team.%{bw.%player%.playing-arena}%::*}:
- set {_p} to loop-value
- send {_p} title "&2&l%{_msg-fcaptured::1}%" with subtitle "%{_msg-fcaptured::2}%" for 5 seconds
- loop {bw.blue-team.%{bw.%player%.playing-arena}%::*}:
- set {_p} to loop-value
- send {_p} title "&4&l%{_msg-fcaptured::1}%" with subtitle "%{_msg-fcaptured::2}%" for 5 seconds
- spawn a firework at clicked block
- if clicked block is blue wool or redglass:
- if {bw.%player%.team} is "blue":
- add 1 to {bw.bluepoints.%{bw.%player%.playing-arena}%}
- set slot 8 of player's inventory to air
- set block at {bw.redblock.%{bw.%player%.playing-arena}%} to red wool
- set the helmet of player to leather helmet
- remove slowness from player
- set {bw.%player%.bandera} to false
- set {_msg-flagcaptured} to {bw.config-msg::game::flag-captured}
- set {_msg-fcaptured::*} to coloured {_msg-flagcaptured} split at "//"
- set {_team} to "&cRed"
- replace all "<team>" with "%{_team}%" in {_msg-fcaptured::2}
- replace all "<player>" with "&9%player%" in {_msg-fcaptured::2}
- loop {bw.red-team.%{bw.%player%.playing-arena}%::*}:
- set {_p} to loop-value
- send {_p} title "&4&l%{_msg-fcaptured::1}%" with subtitle "%{_msg-fcaptured::2}%" for 5 seconds
- loop {bw.blue-team.%{bw.%player%.playing-arena}%::*}:
- set {_p} to loop-value
- send {_p} title "&2&l%{_msg-fcaptured::1}%" with subtitle "%{_msg-fcaptured::2}%" for 5 seconds
- spawn a firework at clicked block
- else if {bw.phase.%{bw.%player%.playing-arena}%} is "overtime":
- if clicked block is red wool or blueglass:
- if {bw.%player%.team} is "red":
- add 1 to {bw.redpoints.%{bw.%player%.playing-arena}%}
- set slot 8 of player's inventory to air
- set block at {bw.blueblock.%{bw.%player%.playing-arena}%} to blue wool
- set the helmet of player to leather helmet
- remove slowness from player
- set {bw.%player%.bandera} to false
- set {_msg-flagcaptured} to {bw.config-msg::game::flag-captured}
- set {_msg-fcaptured::*} to coloured {_msg-flagcaptured} split at "//"
- set {_team} to "&9Blue"
- replace all "<team>" with "%{_team}%" in {_msg-fcaptured::2}
- replace all "<player>" with "&c%player%" in {_msg-fcaptured::2}
- loop {bw.red-team.%{bw.%player%.playing-arena}%::*}:
- set {_p} to loop-value
- send {_p} title "&2&l%{_msg-fcaptured::1}%" with subtitle "%{_msg-fcaptured::2}%" for 5 seconds
- loop {bw.blue-team.%{bw.%player%.playing-arena}%::*}:
- set {_p} to loop-value
- send {_p} title "&4&l%{_msg-fcaptured::1}%" with subtitle "%{_msg-fcaptured::2}%" for 5 seconds
- spawn a firework at clicked block
- send "%{bw.config-msg::win::red-win}%" to {bw.players.%{bw.%player%.playing-arena}%::*}
- loop {bw.red-team.%{bw.%player%.playing-arena}%::*}:
- add 1 to {bw.stats.wins::%loop-value%}
- invoke "bw-give-rewards" from loop-value and "win"
- loop {bw.players.%{bw.%player%.playing-arena}%::*}:
- invoke "bw-endgame" from loop-value
- loop 20 times:
- spawn firework at {bw.red-team.%{bw.%player%.playing-arena}%::*}
- wait 8 ticks
- set {_arena} to {bw.%player%.playing-arena}
- loop {bw.players.%{bw.%player%.playing-arena}%::*}:
- make loop-value execute command "/bw leave"
- wait 1 seconds
- make console execute command "/bw stop %{_arena}%"
- if clicked block is blue wool or redglass:
- if {bw.%player%.team} is "blue":
- add 1 to {bw.bluepoints.%{bw.%player%.playing-arena}%}
- set slot 8 of player's inventory to air
- set block at {bw.redblock.%{bw.%player%.playing-arena}%} to red wool
- set the helmet of player to leather helmet
- remove slowness from player
- set {bw.%player%.bandera} to false
- set {_msg-flagcaptured} to {bw.config-msg::game::flag-captured}
- set {_msg-fcaptured::*} to coloured {_msg-flagcaptured} split at "//"
- set {_team} to "&cRed"
- replace all "<team>" with "%{_team}%" in {_msg-fcaptured::2}
- replace all "<player>" with "&9%player%" in {_msg-fcaptured::2}
- loop {bw.red-team.%{bw.%player%.playing-arena}%::*}:
- set {_p} to loop-value
- send {_p} title "&4&l%{_msg-fcaptured::1}%" with subtitle "%{_msg-fcaptured::2}%" for 5 seconds
- loop {bw.blue-team.%{bw.%player%.playing-arena}%::*}:
- set {_p} to loop-value
- send {_p} title "&2&l%{_msg-fcaptured::1}%" with subtitle "%{_msg-fcaptured::2}%" for 5 seconds
- spawn a firework at clicked block
- send "%{bw.config-msg::win::blue-win}%" to {bw.players.%{bw.%player%.playing-arena}%::*}
- loop {bw.blue-team.%{bw.%player%.playing-arena}%::*}:
- add 1 to {bw.stats.wins::%loop-value%}
- invoke "bw-give-rewards" from loop-value and "win"
- loop {bw.players.%{bw.%player%.playing-arena}%::*}:
- invoke "bw-endgame" from loop-value
- loop 20 times:
- spawn firework at {bw.blue-team.%{bw.%player%.playing-arena}%::*}
- wait 8 ticks
- set {_arena} to {bw.%player%.playing-arena}
- loop {bw.players.%{bw.%player%.playing-arena}%::*}:
- make loop-value execute command "/bw leave"
- wait 1 seconds
- make console execute command "/bw stop %{_arena}%"
- on join:
- if player has permission "blockwars.admin":
- delete {bw-setup.%player%.pos1}
- delete {bw-setup.%player%.pos2}
- on quit:
- if player has permission "blockwars.admin":
- delete {bw-setup.%player%.pos1}
- delete {bw-setup.%player%.pos2}
- on place a blue wool:
- if name of tool of player is "&9Set Blue Villager":
- if player has permission "blockwars.admin":
- cancel event
- set {_arena} to uncolored lore of tool of player
- create a citizen named "%{bw.config::kit::villager-name}%" at event-block
- set {_id} to last created citizen
- if player is op:
- make player execute command "/npc select %{_id}%"
- make player execute command "/npc type Villager"
- else:
- op the player
- wait 1 tick
- make player execute command "/npc select %{_id}%"
- make player execute command "/npc type Villager"
- wait 1 tick
- deop the player
- make citizen {_id} invulnerable
- set citizen {_id} nametag visible
- give npc {_id} the look close trait
- set {bw.blue-villager.%{_arena}%::id} to last created citizen
- set {bw.blue-villager.%{_arena}%::location} to location of event-block
- send "&aYou have set the villager of the &9Blue &ateam of game %{_arena}%!"
- else:
- cancel event
- send "&c%{bw.config-msg::error::no-permission}%"
- on place a red wool:
- if name of tool of player is "&4Set Red Villager":
- if player has permission "blockwars.admin":
- cancel event
- set {_arena} to uncolored lore of tool of player
- create a citizen named "%{bw.config::kit::villager-name}%" at event-block
- set {_id} to last created citizen
- if player is op:
- make player execute command "/npc select %{_id}%"
- make player execute command "/npc type Villager"
- else:
- op the player
- wait 1 tick
- make player execute command "/npc select %{_id}%"
- make player execute command "/npc type Villager"
- wait 1 tick
- deop the player
- make citizen {_id} invulnerable
- set citizen {_id} nametag visible
- give npc {_id} the look close trait
- set {bw.red-villager.%{_arena}%::id} to last created citizen
- set {bw.red-villager.%{_arena}%::location} to location of event-block
- send "&aYou have set the villager of the &cRed &ateam of game %{_arena}%!"
- else:
- cancel event
- send "&c%{bw.config-msg::error::no-permission}%"
- on place a blue wool:
- if name of tool of player is "&9Set Blue Block":
- if player has permission "blockwars.admin":
- set {_arena} to uncolored lore of tool of player
- set {bw.blueblock.%{_arena}%} to location of event-block
- set block at {bw.blueblock.%{_arena}%} to blue wool
- send "&aYou have set the block of the &9Blue &ateam of game %{_arena}%!"
- else:
- cancel event
- send "&c%{bw.config-msg::error::no-permission}%"
- on place a red wool:
- if name of tool of player is "&4Set Red Block":
- if player has permission "blockwars.admin":
- set {_arena} to uncolored lore of tool of player
- set {bw.redblock.%{_arena}%} to location of event-block
- set block at {bw.redblock.%{_arena}%} to red wool
- send "&aYou have set the block of the &cRed &ateam of game %{_arena}%!"
- else:
- cancel event
- send "&c%{bw.config-msg::error::no-permission}%"
- on place a blue wool:
- if name of tool of player is "&9Set Blue Spawn":
- if player has permission "blockwars.admin":
- set {_arena} to uncolored lore of tool of player
- set {bw.bluespawn.%{_arena}%} to location of event-block
- send "&aYou have set the spawn point of the &9Blue &ateam of game %{_arena}%!"
- cancel event
- else:
- cancel event
- send "&c%{bw.config-msg::error::no-permission}%"
- on place a red wool:
- if name of tool of player is "&4Set Red Spawn":
- if player has permission "blockwars.admin":
- set {_arena} to uncolored lore of tool of player
- set {bw.redspawn.%{_arena}%} to location of event-block
- send "&aYou have set the spawn point of the &cRed &ateam of game %{_arena}%!"
- cancel event
- else:
- cancel event
- send "&c%{bw.config-msg::error::no-permission}%"
- on rightclick with arrow:
- if name of tool of player is "&a&lBlockWars Tool":
- if player has permission "blockwars.admin":
- if clicked block is not air:
- set {bw-setup.%player%.pos2} to location of clicked block
- send "&aYou have set the position 2!"
- cancel event
- else:
- cancel event
- send "&c%{bw.config-msg::error::no-permission}%"
- on leftclick with arrow:
- if name of tool of player is "&a&lBlockWars Tool":
- if player has permission "blockwars.admin":
- if clicked block is not air:
- set {bw-setup.%player%.pos1} to location of clicked block
- send "&aYou have set the position 1!"
- cancel event
- else:
- cancel event
- send "&c%{bw.config-msg::error::no-permission}%"
- on sign change:
- if player has permission "blockwars.admin":
- if line 1 is "[blockwars]" or "[bw]":
- if line 2 is "join" or "Join":
- if {bw.arena.%uncolored line 3%} is set:
- set line 1 to "%{bw.config::sign::header}%"
- set line 2 to "&eLoading..."
- set line 3 to "&7%uncolored line 3%"
- set line 4 to "&8*/*"
- if {bw.config::sign-block.enable} is "true":
- if block 1 behind the block at event-block is not air:
- set block 1 behind the block at event-block to "95:0" parsed as item
- set {bw.sign-loc::%location of event-block%} to location of event-block
- set {bw.sign-loc::%location of event-block%} to location of event-block
- send "%{bw.config::prefix}% &aSign successfully placed!"
- else:
- set line 1 to "%{bw.config::sign::header}%"
- set line 2 to "&cError"
- send "&cThis game does not exist!"
- on break a sign or wall sign:
- if {bw.sign-loc::%location of event-block%} is set:
- if player is op:
- delete {bw.sign-loc::%location of event-block%}
- send "%{bw.config::prefix}% &cSign Removed!"
- else:
- cancel event
- every 5 seconds:
- if {bw.sign-loc::*} is set:
- loop {bw.sign-loc::*}:
- set {_block} to block at {bw.sign-loc::%loop-value%}
- if "%{_block}%" is not "sign" or "wall sign":
- set {_loc} to location of {_block}
- set block at {_loc} to air
- delete {bw.sign-loc::%{_loc}%}
- send "&cSign removed! [%{_loc}%]" to console
- send "&cSign removed! [%{_loc}%]" to all ops
- else:
- set {_arena.sign} to uncolored line 3 of {_block}
- if {bw.arena.%{_arena.sign}%} is set:
- if {bw.status.%{_arena.sign}%} is "Waiting":
- set line 1 of {_block} to "%{bw.config::sign::header}%"
- set line 2 of {_block} to "&a%{bw.config::sign::waiting}%"
- set line 3 of {_block} to "&7%{_arena.sign}%"
- set line 4 of {_block} to "&8%{bw.amountplayers.%{_arena.sign}%}%/%{bw.playerperteam.%{_arena.sign}%}*2%"
- if {bw.config::sign-block.enable} is "true":
- if block 1 behind the block at {_block} is not air:
- set block 1 behind the block at {_block} to "%{bw.config::sign-block.waiting}%" parsed as item
- else if {bw.status.%{_arena.sign}%} is "Starting":
- set line 1 of {_block} to "%{bw.config::sign::header}%"
- set line 2 of {_block} to "&6%{bw.config::sign::starting}%"
- set line 3 of {_block} to "&7%{_arena.sign}%"
- set line 4 of {_block} to "&8%{bw.amountplayers.%{_arena.sign}%}%/%{bw.playerperteam.%{_arena.sign}%}*2%"
- if {bw.config::sign-block.enable} is "true":
- if block 1 behind the block at {_block} is not air:
- set block 1 behind the block at {_block} to "%{bw.config::sign-block.starting}%" parsed as item
- else if {bw.status.%{_arena.sign}%} is "Ingame":
- set line 1 of {_block} to "%{bw.config::sign::header}%"
- set line 2 of {_block} to "&c%{bw.config::sign::gingame}%"
- set line 3 of {_block} to "&7%{_arena.sign}%"
- set line 4 of {_block} to "&8%{bw.amountplayers.%{_arena.sign}%}%/%{bw.playerperteam.%{_arena.sign}%}*2%"
- if {bw.config::sign-block.enable} is "true":
- if block 1 behind the block at {_block} is not air:
- set block 1 behind the block at {_block} to "%{bw.config::sign-block.gingame}%" parsed as item
- else if {bw.status.%{_arena.sign}%} is "Rebuild":
- set line 1 of {_block} to "%{bw.config::sign::header}%"
- set line 2 of {_block} to "&5%{bw.config::sign::rebuild}%"
- set line 3 of {_block} to "&7%{_arena.sign}%"
- set line 4 of {_block} to "&8%{bw.amountplayers.%{_arena.sign}%}%/%{bw.playerperteam.%{_arena.sign}%}*2%"
- if {bw.config::sign-block.enable} is "true":
- if block 1 behind the block at {_block} is not air:
- set block 1 behind the block at {_block} to "%{bw.config::sign-block.rebuild}%" parsed as item
- else if {bw.status.%{_arena.sign}%} is "NotReady":
- set line 1 of {_block} to "%{bw.config::sign::header}%"
- set line 2 of {_block} to "&4%{bw.config::sign::notready}%"
- set line 3 of {_block} to "&7%{_arena.sign}%"
- set line 4 of {_block} to "&8%{bw.amountplayers.%{_arena.sign}%}%/%{bw.playerperteam.%{_arena.sign}%}*2%"
- if {bw.config::sign-block.enable} is "true":
- if block 1 behind the block at {_block} is not air:
- set block 1 behind the block at {_block} to "%{bw.config::sign-block.notready}%" parsed as item
- chance of 50%:
- wait 1 seconds
- else:
- wait 0.5 seconds
- on rightclick on sign or wall sign:
- if {bw.sign-loc::%location of clicked block%} is set:
- set {_block} to block at {bw.sign-loc::%location of clicked block%}
- set {_arena.join} to uncolored line 3 of {_block}
- wait 0.1 ticks
- make player execute command "/blockwars join %{_arena.join}%"
- sub "bw-give-rewards":
- set {_p} to parameter 1
- set {_type} to parameter 2
- set {_money.enable} to yaml value "config.rewards.%{_type}%.money.enable" from file "../../BlockWars/rewards.yml"
- set {_command.enable} to yaml value "config.rewards.%{_type}%.command.enable" from file "../../BlockWars/rewards.yml"
- set {_message.enable} to yaml value "config.rewards.%{_type}%.message.enable" from file "../../BlockWars/rewards.yml"
- if {_money.enable} is "true":
- set {_money.amount} to yaml value "config.rewards.%{_type}%.money.amount" from file "../../BlockWars/rewards.yml"
- set {_money.amount} to {_money.amount} parsed as integer
- evaluate "add {_money.amount} to balance of {_p}"
- if {_command.enable} is "true":
- set {_cmd} to yaml value "config.rewards.%{_type}%.command.cmd" from file "../../BlockWars/rewards.yml"
- if {_cmd} is set:
- replace all "<player>" with "%{_p}%" in {_cmd}
- make console execute command "%{_cmd}%"
- if {_message.enable} is "true":
- set {_msg} to yaml value "config.rewards.%{_type}%.message.msg" from file "../../BlockWars/rewards.yml"
- send "%{_msg}%" to {_p}
- sub "bw-team-gui":
- set {_p} to parameter 1
- set {_arena} to {bw.%{_p}%.playing-arena}
- open chest with 1 rows named "%{bw.config::item::team-item-name}%" to {_p}
- wait 1 tick
- if size of {bw.blue-team.%{_arena}%::*} > 0:
- loop {bw.blue-team.%{_arena}%::*}:
- set {_players.blueteam::%loop-value%} to "&7- &e%loop-value%||"
- set {_lore.blue} to "%{_players.blueteam::*}%"
- clear {_players.blueteam::*}
- replace all " ," with "," in {_lore.blue}
- replace all ", " with "," in {_lore.blue}
- replace all " , " with "," in {_lore.blue}
- replace all "," with "" in {_lore.blue}
- replace all " and" with "and" in {_lore.blue}
- replace all "and " with "and" in {_lore.blue}
- replace all " and " with "and" in {_lore.blue}
- replace all "and" with "" in {_lore.blue}
- format slot 0 of {_p} with blue wool named "&9Blue &7- %size of {bw.blue-team.%{_arena}%::*}%/%{bw.playerperteam.%{_arena}%}%" with lore "%{_lore.blue}%" to close then run [invoke "bw-selectteam" from {_p} and "blue"]
- else:
- format slot 0 of {_p} with blue wool named "&9Blue &7- %size of {bw.blue-team.%{_arena}%::*}%/%{bw.playerperteam.%{_arena}%}%" to close then run [invoke "bw-selectteam" from {_p} and "blue"]
- if size of {bw.red-team.%{_arena}%::*} > 0:
- loop {bw.red-team.%{_arena}%::*}:
- set {_players.redteam::%loop-value%} to "&7- &e%loop-value%||"
- set {_lore.red} to "%{_players.redteam::*}%"
- clear {_players.redteam::*}
- replace all " ," with "," in {_lore.red}
- replace all ", " with "," in {_lore.red}
- replace all " , " with "," in {_lore.red}
- replace all "," with "" in {_lore.red}
- replace all " and" with "and" in {_lore.red}
- replace all "and " with "and" in {_lore.red}
- replace all " and " with "and" in {_lore.red}
- replace all "and" with "" in {_lore.red}
- format slot 1 of {_p} with red wool named "&cRed &7- %size of {bw.red-team.%{_arena}%::*}%/%{bw.playerperteam.%{_arena}%}%" with lore "%{_lore.red}%" to close then run [invoke "bw-selectteam" from {_p} and "red"]
- else:
- format slot 1 of {_p} with red wool named "&cRed &7- %size of {bw.red-team.%{_arena}%::*}%/%{bw.playerperteam.%{_arena}%}%" to close then run [invoke "bw-selectteam" from {_p} and "red"]
- sub "bw-selectteam":
- set {_p} to parameter 1
- set {_arena} to {bw.%{_p}%.playing-arena}
- set {_team} to parameter 2
- if {_team} is "red":
- if {bw.%{_p}%.team} is "red":
- send "%{bw.config-msg::game::jointeam-red}%" to {_p}
- else:
- if size of {bw.red-team.%{_arena}%::*} < {bw.playerperteam.%{_arena}%}:
- set {bw.%{_p}%.team} to "red"
- set {bw.red-team.%{_arena}%::%{_p}%} to {_p}
- delete {bw.blue-team.%{_arena}%::%{_p}%}
- remove {_p} from {bw.blue-team.%{_arena}%::*}
- send "%{bw.config-msg::game::jointeam-red}%" to {_p}
- else:
- send "&c%{bw.config-msg::error::full-team}%" to {_p}
- else if {_team} is "blue":
- if {bw.%{_p}%.team} is "blue":
- send "%{bw.config-msg::game::jointeam-blue}%" to {_p}
- else:
- if size of {bw.blue-team.%{_arena}%::*} < {bw.playerperteam.%{_arena}%}:
- set {bw.%{_p}%.team} to "blue"
- set {bw.blue-team.%{_arena}%::%{_p}%} to {_p}
- remove {_p} from {bw.red-team.%{_arena}%::*}
- delete {bw.red-team.%{_arena}%::%{_p}%}
- send "%{bw.config-msg::game::jointeam-blue}%" to {_p}
- else:
- send "&c%{bw.config-msg::error::full-team}%" to {_p}
- sub "bw-stats-hologram-update":
- set {_p} to parameter 1
- evaluate "delete holo object ""bw.%{_p}%.holo-stats"""
- wait 1 tick
- set {_stats.holo} to {bw.config::hologram::stats-holo}
- replace all "<wins>" with "%{bw.stats.wins::%{_p}%}%" in {_stats.holo}
- replace all "<kills>" with "%{bw.stats.kills::%{_p}%}%" in {_stats.holo}
- replace all "<deaths>" with "%{bw.stats.deaths::%{_p}%}%" in {_stats.holo}
- replace all "<flags-captured>" with "%{bw.stats.flags-captured::%{_p}%}%" in {_stats.holo}
- replace all "<games-played>" with "%{bw.stats.games-played::%{_p}%}%" in {_stats.holo}
- replace all "<arrow-shot>" with "%{bw.stats.arrow-shoot::%{_p}%}%" in {_stats.holo}
- replace all "<arrow-hit>" with "%{bw.stats.arrow-hit::%{_p}%}%" in {_stats.holo}
- replace all "<block-bloken>" with "%{bw.stats.block-bloken::%{_p}%}%" in {_stats.holo}
- replace all "<block-placed>" with "%{bw.stats.block-placed::%{_p}%}%" in {_stats.holo}
- replace all "<player>" with "%{_p}%" in {_stats.holo}
- replace all "//" with ";" in {_stats.holo}
- evaluate "create interactive client side holo object ""%coloured {_stats.holo}%"" with id ""bw.%{_p}%.holo-stats"" at {bw.loc-holo} to {_p}"
- sub "bw-gui-kits":
- set {_p} to parameter 1
- set {_kits::*} to yaml nodes "config.kits" from file "../../BlockWars/kits.yml"
- if {_kits::*} is set:
- set {_rows} to size of {_kits::*}/9
- if {_rows} < 1:
- set {_rows} to 1
- else if {_rows} > 6:
- set {_rows} to 6
- set {_slot} to 0
- open chest with {_rows} rows named "%{bw.config::kit::title-gui}%" to {_p}
- wait 1 tick
- loop {_kits::*}:
- set {_name} to yaml value "config.kits.%loop-value%.name" from file "../../BlockWars/kits.yml"
- set {_lore} to yaml value "config.kits.%loop-value%.lore" from file "../../BlockWars/kits.yml"
- replace all "//" with "||" in {_lore}
- set {_purchase} to yaml value "config.kits.%loop-value%.purchase" from file "../../BlockWars/kits.yml"
- if {_purchase} is "true":
- if {bw.%{_p}%.kits-purchased::%loop-value%} is not set:
- set {_name} to "&c%{_name}%"
- else:
- set {_name} to "&a%{_name}%"
- else:
- set {_name} to "&a%{_name}%"
- set {_icon} to yaml value "config.kits.%loop-value%.icon" from file "../../BlockWars/kits.yml"
- set {_icon} to {_icon} parsed as item
- if {_lore} is set:
- set {_gui} to "format slot {_slot} of {_p} with {_icon} named ""%{_name}%"" with lore ""%coloured {_lore}%"" to close then run [invoke ""bw-select-kit"" from {_p} and ""%loop-value-1%""]"
- else:
- set {_gui} to "format slot {_slot} of {_p} with {_icon} named ""%{_name}%"" to close then run [invoke ""bw-select-kit"" from {_p} and ""%loop-value-1%""]"
- evaluate {_gui}
- add 1 to {_slot}
- else:
- send "&4Error" to {_p}
- sub "bw-buy-kit":
- set {_p} to parameter 1
- set {_kit} to parameter 2
- set {_purchase} to yaml value "config.kits.%{_kit}%.purchase" from file "../../BlockWars/kits.yml"
- if {_purchase} is "true":
- if {bw.%{_p}%.kits-purchased::%{_kit}%} is not set:
- set {_price} to yaml value "config.kits.%{_kit}%.price" from file "../../BlockWars/kits.yml"
- set {_price} to {_price} parsed as integer
- if balance of {_p} >= {_price}:
- remove {_price} from balance of {_p}
- set {bw.%{_p}%.kits-purchased::%{_kit}%} to true
- set {_kit-msg} to {bw.config-msg::kit::kit-purchased}
- replace all "<kit>" with "%{_kit}%" in {_kit-msg}
- send "%{_kit-msg}%" to {_p}
- else:
- send "&c%{bw.config-msg::error::no-money}%" to {_p}
- else:
- send "&c%{bw.config-msg::kit::kit-already-purchased}%" to {_p}
- sub "bw-select-kit":
- set {_p} to parameter 1
- set {_kit} to parameter 2
- set {_purchase} to yaml value "config.kits.%{_kit}%.purchase" from file "../../BlockWars/kits.yml"
- if {_purchase} is "true":
- if {bw.%{_p}%.kits-purchased::%{_kit}%} is set:
- if {bw.status.%{bw.%{_p}%.playing-arena}%} is "Waiting" or "Starting":
- set {_kits::*} to yaml nodes "config.kits" from file "../../BlockWars/kits.yml"
- loop {_kits::*}:
- set {_disp::%loop-value%} to loop-value
- if {_disp::%{_kit}%} is set:
- set {bw.%{_p}%.kit} to "%{_kit}%"
- set {_msg.kit} to {bw.config-msg::kit::kit-select-lobby}
- replace all "<kit>" with "%{_kit}%" in {_msg.kit}
- send "%{_msg.kit}%" to {_p}
- else if {bw.status.%{bw.%{_p}%.playing-arena}%} is "Ingame":
- set {_kits::*} to yaml nodes "config.kits" from file "../../BlockWars/kits.yml"
- loop {_kits::*}:
- set {_disp::%loop-value%} to loop-value
- if {_disp::%{_kit}%} is set:
- set {bw.%{_p}%.kit} to "%{_kit}%"
- set {_msg.kit} to {bw.config-msg::kit::kit-select-ingame}
- replace all "<kit>" with "%{_kit}%" in {_msg.kit}
- send "%{_msg.kit}%" to {_p}
- else:
- send "&c%{bw.config-msg::error::kit-not-bought}%" to {_p}
- else:
- if {bw.status.%{bw.%{_p}%.playing-arena}%} is "Waiting" or "Starting":
- set {_kits::*} to yaml nodes "config.kits" from file "../../BlockWars/kits.yml"
- loop {_kits::*}:
- set {_disp::%loop-value%} to loop-value
- if {_disp::%{_kit}%} is set:
- set {bw.%{_p}%.kit} to "%{_kit}%"
- set {_msg.kit} to {bw.config-msg::kit::kit-select-lobby}
- replace all "<kit>" with "%{_kit}%" in {_msg.kit}
- send "%{_msg.kit}%" to {_p}
- else if {bw.status.%{bw.%{_p}%.playing-arena}%} is "Ingame":
- set {_kits::*} to yaml nodes "config.kits" from file "../../BlockWars/kits.yml"
- loop {_kits::*}:
- set {_disp::%loop-value%} to loop-value
- if {_disp::%{_kit}%} is set:
- set {bw.%{_p}%.kit} to "%{_kit}%"
- set {_msg.kit} to {bw.config-msg::kit::kit-select-ingame}
- replace all "<kit>" with "%{_kit}%" in {_msg.kit}
- send "%{_msg.kit}%" to {_p}
- sub "bw-give-kits":
- set {_p} to parameter 1
- remove speed from {_p}
- remove jump boost from {_p}
- set {_kit} to parameter 2
- if {bw.%{_p}%.kit} is set:
- set {_kits::*} to yaml nodes "config.kits" from file "../../BlockWars/kits.yml"
- loop {_kits::*}:
- set {_disp::%loop-value%} to loop-value
- if {_disp::%{_kit}%} is set:
- clear {_p}'s inventory
- set {_helmet} to yaml value "config.kits.%{_kit}%.armour.helmet" from file "../../BlockWars/kits.yml"
- set {_helmet} to {_helmet} parsed as item
- set {_chestplate} to yaml value "config.kits.%{_kit}%.armour.chestplate" from file "../../BlockWars/kits.yml"
- set {_chestplate} to {_chestplate} parsed as item
- set {_leggings} to yaml value "config.kits.%{_kit}%.armour.leggings" from file "../../BlockWars/kits.yml"
- set {_leggings} to {_leggings} parsed as item
- set {_boots} to yaml value "config.kits.%{_kit}%.armour.boots" from file "../../BlockWars/kits.yml"
- set {_boots} to {_boots} parsed as item
- set {_items::*} to yaml nodes "config.kits.%{_kit}%.items" from file "../../BlockWars/kits.yml"
- set helmet of {_p} to {_helmet}
- set chestplate of {_p} to {_chestplate}
- set leggings of {_p} to {_leggings}
- set boots of {_p} to {_boots}
- loop {_items::*}:
- set {_i} to loop-value parsed as item
- give {_i} to {_p}
- else:
- clear {_p}'s inventory
- equip {_p} with all leather armour
- give a stone sword to {_p}
- give a bow to {_p}
- give a wood pickaxe to {_p}
- give 3 arrow to {_p}
- else:
- clear {_p}'s inventory
- equip {_p} with all leather armour
- give a stone sword to {_p}
- give a bow to {_p}
- give a wood pickaxe to {_p}
- give 3 arrow to {_p}
- sub "bw-endgame":
- set {_player} to parameter 1
- set {bw.%{_player}%.no-damage} to true
- clear {_player}'s inventory
- wipe {_player}'s sidebar
- set gamemode of {_player} to survival
- sub "bw-lobbyscoreboard":
- set {_p} to parameter 1
- set {_arena} to {bw.%{_p}%.playing-arena}
- set {_amount} to size of {bw.players.%{_arena}%::*}
- set {_max} to {bw.playerperteam.%{_arena}%}*2
- wipe {_p}'s sidebar
- set {_n} to size of {bw.config::scoreboard-lobby::lines::*}
- set name of sidebar of {_p} to "%{bw.config::scoreboard-lobby::title}%"
- loop {bw.config::scoreboard-lobby::lines::*}:
- set {_sb.line} to "%loop-value%"
- set {_colors::*} to integers from 0 to 9, "a", "b", "c", "d", "e", "f", "o", "r", "k" and "l"
- set {_espacios::*} to " ", " ", " ", " " and " "
- replace all "<empty>" with "&%random element of {_colors::*}%&%random element of {_colors::*}%&%random element of {_colors::*}%&%random element of {_colors::*}%%random element of {_espacios::*}%" in {_sb.line}
- replace all "<arena>" with "%{_arena}%" in {_sb.line}
- replace all "<amount>" with "%{_amount}%" in {_sb.line}
- replace all "<max>" with "%{_max}%" in {_sb.line}
- set score "%coloured {_sb.line}%" in sidebar of {_p} to {_n}
- remove 1 from {_n}
- sub "bw-ingamescoreboard":
- set {_p} to parameter 1
- set {_arena} to {bw.%{_p}%.playing-arena}
- set {_amount} to size of {bw.players.%{_arena}%::*}
- set {_max} to {bw.playerperteam.%{_arena}%}*2
- set {_fase} to {bw.phase.%{_arena}%}
- if {_fase} is "build":
- set {_fase} to "%{bw.config-msg::phase::phase-build}%"
- else if {_fase} is "figth":
- set {_fase} to "%{bw.config-msg::phase::phase-figth}%"
- else if {_fase} is "overtime":
- set {_fase} to "%{bw.config-msg::phase::phase-overtime}%"
- set {_time} to "%{bw.time.%{_arena}%}%" parsed as text
- replace all "and" with "" in {_time}
- replace all "seconds" and "second" with "s" in {_time}
- replace all "minutes" and "minute" with "m" in {_time}
- replace all " " with "" in {_time}
- replace all "m" with ":" in {_time}
- replace all "s" with "" in {_time}
- set {_time::*} to {_time} split at ":"
- if {_time} is "1:":
- set {_Tiempo} to "01:00"
- else if {_time} is "2:":
- set {_Tiempo} to "02:00"
- else if {_time} is "3:":
- set {_Tiempo} to "03:00"
- else if {_time} is "4:":
- set {_Tiempo} to "04:00"
- else if {_time} is "5:":
- set {_Tiempo} to "05:00"
- else if {_time} is "6:":
- set {_Tiempo} to "06:00"
- else if {_time} is "7:":
- set {_Tiempo} to "07:00"
- else if {_time} is "8:":
- set {_Tiempo} to "08:00"
- else if {_time} is "9:":
- set {_Tiempo} to "09:00"
- else:
- if size of {_time::*} is 2:
- set {_seg} to {_time::2}
- if {_seg} is "1":
- set {_seg} to "01"
- if {_seg} is "2":
- set {_seg} to "02"
- if {_seg} is "3":
- set {_seg} to "03"
- if {_seg} is "4":
- set {_seg} to "04"
- if {_seg} is "5":
- set {_seg} to "05"
- if {_seg} is "6":
- set {_seg} to "06"
- if {_seg} is "7":
- set {_seg} to "07"
- if {_seg} is "8":
- set {_seg} to "08"
- if {_seg} is "9":
- set {_seg} to "09"
- set {_Tiempo} to "0%{_time::1}%:%{_seg}%"
- else if size of {_time::*} is 1:
- set {_seg} to {_time::1}
- if {_seg} is "1":
- set {_seg} to "01"
- if {_seg} is "2":
- set {_seg} to "02"
- if {_seg} is "3":
- set {_seg} to "03"
- if {_seg} is "4":
- set {_seg} to "04"
- if {_seg} is "5":
- set {_seg} to "05"
- if {_seg} is "6":
- set {_seg} to "06"
- if {_seg} is "7":
- set {_seg} to "07"
- if {_seg} is "8":
- set {_seg} to "08"
- if {_seg} is "9":
- set {_seg} to "09"
- set {_Tiempo} to "00:%{_seg}%"
- set {_pt.red} to {bw.redpoints.%{_arena}%}
- set {_pt.blue} to {bw.bluepoints.%{_arena}%}
- wipe {_p}'s sidebar
- set {_n} to size of {bw.config::scoreboard-ingame::lines::*}
- set name of sidebar of {_p} to "%{bw.config::scoreboard-ingame::title}%"
- loop {bw.config::scoreboard-ingame::lines::*}:
- set {_sb.line} to "%loop-value%"
- set {_colors::*} to integers from 0 to 9, "a", "b", "c", "d", "e", "f", "o", "r", "k" and "l"
- set {_espacios::*} to " ", " ", " ", " " and " "
- replace all "<empty>" with "&%random element of {_colors::*}%&%random element of {_colors::*}%&%random element of {_colors::*}%&%random element of {_colors::*}%%random element of {_espacios::*}%" in {_sb.line}
- replace all "<arena>" with "%{_arena}%" in {_sb.line}
- replace all "<amount>" with "%{_amount}%" in {_sb.line}
- replace all "<max>" with "%{_max}%" in {_sb.line}
- replace all "<phase>" with "%{_fase}%" in {_sb.line}
- replace all "<time>" with "%{_Tiempo}%" in {_sb.line}
- replace all "<blue-flag-captured>" with "%{_pt.blue}%" in {_sb.line}
- replace all "<red-flag-captured>" with "%{_pt.red}%" in {_sb.line}
- set score "%coloured {_sb.line}%" in sidebar of {_p} to {_n}
- remove 1 from {_n}
- sub "bw-files-reload":
- set {_sender} to parameter 1
- send "&7Reloading files..." to {_sender}
- if existence of "plugins/BlockWars/version.txt" is false:
- wait 3 ticks
- create file "plugins/BlockWars/version.txt"
- wf "## Do not change!!" to "plugins/BlockWars/version.txt"
- wf "version: {@VersionID}" to "plugins/BlockWars/version.txt"
- else:
- set {_ver} to text from "http://pastebin.com/raw/7B4aA8fD"
- if {_ver} is set:
- set {_actual} to yaml value "version" from file "../../BlockWars/version.txt"
- if {_ver} is not {_actual}:
- delete file "plugins/BlockWars/config.yml"
- delete file "plugins/BlockWars/message.yml"
- delete file "plugins/BlockWars/sign.yml"
- delete file "plugins/BlockWars/kits.yml"
- delete file "plugins/BlockWars/rewards.yml"
- delete file "plugins/BlockWars/scoreboard.yml"
- delete file "plugins/BlockWars/version.txt"
- send "%{bw.config::prefix}% &aAll config files has bee updated! If no files generated use /blockwars reload." to console
- send "%{bw.config::prefix}% &aAll config files has bee updated! If no files generated use /blockwars reload." to all ops
- else:
- send "%{bw.config::prefix}% &cIt not has been possible to connect to internet!" to console
- send "%{bw.config::prefix}% &cIt not has been possible to connect to internet!" to all ops
- if existence of "plugins/BlockWars/config.yml" is false:
- send "%{bw.config::prefix}% &2File config.yml create!" to {_sender}
- create file "plugins/BlockWars/config.yml"
- wf "## Block Wars MINIGAME - Configuration ##" to "plugins/BlockWars/config.yml"
- set yaml value "config.prefix" from file "../../BlockWars/config.yml" to "&7[&2BlockWars&7]"
- set yaml value "config.rebuild-map-delay" from file "../../BlockWars/config.yml" to "3 seconds"
- set yaml value "config.regeneration-effect" from file "../../BlockWars/config.yml" to "true"
- set yaml value "config.holo-stats" from file "../../BlockWars/config.yml" to "&a<player> &e&lBlockWars &astatistics//&2Wins&7: &f<wins>//&2Kills&7: &f<kills>//&2Deaths&7: &f<deaths>//&2Flags captured&7: &f<flags-captured>//&2Games played&7: &f<games-played>//&2Arrow shot&7: &f<arrow-shot>//&2Arrow hit&7: &f<arrow-hit>//&2Blocks broken&7: &f<block-bloken>//&2Blocks placed&7: &f<block-placed>"
- set yaml value "config.defaults.default_min_players" from file "../../BlockWars/config.yml" to "4"
- set yaml value "config.defaults.default_players_per_team" from file "../../BlockWars/config.yml" to "6"
- set yaml value "config.commands.leave" from file "../../BlockWars/config.yml" to "leave"
- set yaml value "config.countdown.lobby" from file "../../BlockWars/config.yml" to "20"
- set yaml value "config.chat.lobby" from file "../../BlockWars/config.yml" to "&7<player>: <msg>"
- set yaml value "config.chat.team" from file "../../BlockWars/config.yml" to "&b[Team] &e<player>&f: &7<msg>"
- set yaml value "config.chat.global" from file "../../BlockWars/config.yml" to "&4[Global] &e<player>&f: &7<msg>"
- set yaml value "config.kits.title" from file "../../BlockWars/config.yml" to "&8Kit Selection"
- set yaml value "config.kits.villager-name" from file "../../BlockWars/config.yml" to "&aKits"
- set yaml value "config.shop.title" from file "../../BlockWars/config.yml" to "&0BlockWars Shop"
- set yaml value "config.items.kits.id" from file "../../BlockWars/config.yml" to "339:0"
- set yaml value "config.items.kits.name" from file "../../BlockWars/config.yml" to "&aKit Selection"
- set yaml value "config.items.kits.slot" from file "../../BlockWars/config.yml" to "1"
- set yaml value "config.items.select-team.id" from file "../../BlockWars/config.yml" to "399:0"
- set yaml value "config.items.select-team.name" from file "../../BlockWars/config.yml" to "&aTeam Selection"
- set yaml value "config.items.select-team.slot" from file "../../BlockWars/config.yml" to "0"
- set yaml value "config.items.leave.id" from file "../../BlockWars/config.yml" to "331:0"
- set yaml value "config.items.leave.name" from file "../../BlockWars/config.yml" to "&cLeave the game"
- set yaml value "config.items.leave.slot" from file "../../BlockWars/config.yml" to "8"
- set {bw.config::prefix} to yaml value "config.prefix" from file "../../BlockWars/config.yml"
- set {bw.config::rebuild-map-delay} to yaml value "config.rebuild-map-delay" from file "../../BlockWars/config.yml"
- set {bw.config::rebuild-map-delay} to {bw.config::rebuild-map-delay} parsed as timespan
- set {bw.config::config::regeneration-effect} to yaml value "config.regeneration-effect" from file "../../BlockWars/config.yml"
- set {bw.config::hologram::stats-holo} to yaml value "config.holo-stats" from file "../../BlockWars/config.yml"
- set {bw.config::config::default_min_players} to yaml value "config.defaults.default_min_players" from file "../../BlockWars/config.yml"
- set {bw.config::config::default_min_players} to {bw.config::config::default_min_players} parsed as integer
- set {bw.config::config::default_players_per_team} to yaml value "config.defaults.default_players_per_team" from file "../../BlockWars/config.yml"
- set {bw.config::config::default_players_per_team} to {bw.config::config::default_players_per_team} parsed as integer
- set {bw.config::leave-cmd} to yaml value "config.commands.leave" from file "../../BlockWars/config.yml"
- set {bw.config::config::countdown} to yaml value "config.countdown.lobby" from file "../../BlockWars/config.yml"
- set {bw.config::config::countdown} to {bw.config::config::countdown} parsed as integer
- set {bw.config::chat::lobby-chat} to yaml value "config.chat.lobby" from file "../../BlockWars/config.yml"
- set {bw.config::chat::team-chat} to yaml value "config.chat.team" from file "../../BlockWars/config.yml"
- set {bw.config::chat::global-chat} to yaml value "config.chat.global" from file "../../BlockWars/config.yml"
- set {bw.config::kit::title-gui} to yaml value "config.kits.title" from file "../../BlockWars/config.yml"
- set {bw.config::kit::villager-name} to yaml value "config.kits.villager-name" from file "../../BlockWars/config.yml"
- set {bw.config::shop::shop-title-gui} to yaml value "config.shop.title" from file "../../BlockWars/config.yml"
- set {bw.config::item::kit-item-id} to yaml value "config.items.kits.id" from file "../../BlockWars/config.yml"
- set {bw.config::item::kit-item-id} to {bw.config::item::kit-item-id} parsed as item
- set {bw.config::item::kit-item-name} to yaml value "config.items.kits.name" from file "../../BlockWars/config.yml"
- set {bw.config::item::kit-item-slot} to yaml value "config.items.kits.slot" from file "../../BlockWars/config.yml"
- set {bw.config::item::kit-item-slot} to {bw.config::item::kit-item-slot} parsed as integer
- set {bw.config::item::team-item-id} to yaml value "config.items.select-team.id" from file "../../BlockWars/config.yml"
- set {bw.config::item::team-item-id} to {bw.config::item::team-item-id} parsed as item
- set {bw.config::item::team-item-name} to yaml value "config.items.select-team.name" from file "../../BlockWars/config.yml"
- set {bw.config::item::team-item-slot} to yaml value "config.items.select-team.slot" from file "../../BlockWars/config.yml"
- set {bw.config::item::team-item-slot} to {bw.config::item::team-item-slot} parsed as integer
- set {bw.config::item::leave-item-id} to yaml value "config.items.leave.id" from file "../../BlockWars/config.yml"
- set {bw.config::item::leave-item-id} to {bw.config::item::leave-item-id} parsed as item
- set {bw.config::item::leave-item-name} to yaml value "config.items.leave.name" from file "../../BlockWars/config.yml"
- set {bw.config::item::leave-item-slot} to yaml value "config.items.leave.slot" from file "../../BlockWars/config.yml"
- set {bw.config::item::leave-item-slot} to {bw.config::item::leave-item-slot} parsed as integer
- if existence of "plugins/BlockWars/messages.yml" is false:
- send "%{bw.config::prefix}% &2File messages.yml create!" to {_sender}
- create file "plugins/BlockWars/messages.yml"
- wf "## Block Wars MINIGAME - Messages ##" to "plugins/BlockWars/messages.yml"
- set yaml value "messages.error.no-permission" from file "../../BlockWars/messages.yml" to "&cYou do not have permission to do this!"
- set yaml value "messages.error.kit-no-permission" from file "../../BlockWars/messages.yml" to "&cYou do not have permission to select this kit!"
- set yaml value "messages.error.kit-not-bought" from file "../../BlockWars/messages.yml" to "&cYou have not bought this kit!"
- set yaml value "messages.error.no-money" from file "../../BlockWars/messages.yml" to "&cYou do not have enough money!"
- set yaml value "messages.error.no-ingame" from file "../../BlockWars/messages.yml" to "&cYou are not a game!"
- set yaml value "messages.error.ingame" from file "../../BlockWars/messages.yml" to "&cYou are in a game!"
- set yaml value "messages.error.full-game" from file "../../BlockWars/messages.yml" to "&cThis game is in progress!"
- set yaml value "messages.error.not-available" from file "../../BlockWars/messages.yml" to "&cThis game is not available!"
- set yaml value "messages.error.not-exist" from file "../../BlockWars/messages.yml" to "&cThis game does not exist!"
- set yaml value "messages.error.stop-arena" from file "../../BlockWars/messages.yml" to "&cThis play has been stopped!"
- set yaml value "messages.error.no-min-players" from file "../../BlockWars/messages.yml" to "&cIt is to finish the countdown because there are not enough players to start!"
- set yaml value "messages.error.no-build" from file "../../BlockWars/messages.yml" to "&cYou cannot build here!"
- set yaml value "messages.error.no-break" from file "../../BlockWars/messages.yml" to "&cYou can only break the blocks placed!"
- set yaml value "messages.error.capture-own-flag" from file "../../BlockWars/messages.yml" to "&cYou can not take the flag of your team!"
- set yaml value "messages.error.damage-own-team" from file "../../BlockWars/messages.yml" to "&cYou can not attack your own team!"
- set yaml value "messages.error.full-team" from file "../../BlockWars/messages.yml" to "&cYou cannot join this team because it is full!"
- set yaml value "messages.listener.join-broad" from file "../../BlockWars/messages.yml" to "&5<player> joined the game. <amount>/<max>"
- set yaml value "messages.listener.leave-broad-lobby" from file "../../BlockWars/messages.yml" to "&6<player> left the game. <amount>/<max>"
- set yaml value "messages.listener.leave-broad-ingame" from file "../../BlockWars/messages.yml" to "&6<player> &eleft the game!"
- set yaml value "messages.listener.leave-msg" from file "../../BlockWars/messages.yml" to "&fYou have abandoned the game!"
- set yaml value "messages.phase.phase-build" from file "../../BlockWars/messages.yml" to "&a&lBUILD"
- set yaml value "messages.phase.phase-fight" from file "../../BlockWars/messages.yml" to "&c&lFIGTH"
- set yaml value "messages.phase.phase-overtime" from file "../../BlockWars/messages.yml" to "&4&lOVERTIME"
- set yaml value "messages.game.countdown-msg" from file "../../BlockWars/messages.yml" to "&9The game starting in <time> seconds!"
- set yaml value "messages.game.toStart" from file "../../BlockWars/messages.yml" to "&6Game will start!"
- set yaml value "messages.game.jointeam-red" from file "../../BlockWars/messages.yml" to "&aJoined team &cRed&a!"
- set yaml value "messages.game.jointeam-blue" from file "../../BlockWars/messages.yml" to "&aJoined team &9Blue&a!"
- set yaml value "messages.game.phasestart-build" from file "../../BlockWars/messages.yml" to "&6Build blocks around your flag!"
- set yaml value "messages.game.phasestart-fight" from file "../../BlockWars/messages.yml" to "&6Capture de other teams flags!"
- set yaml value "messages.game.phasestart-overtime" from file "../../BlockWars/messages.yml" to "&cThe game is now in overtime! All blocks place have been removed."
- set yaml value "messages.game.flag-taken" from file "../../BlockWars/messages.yml" to "FLAG TAKEN//<player> &7has taken the <team> &7flag!"
- set yaml value "messages.game.flag-dropped" from file "../../BlockWars/messages.yml" to "FLAG DROPPED//<player> &7has dropped the <team> &7flag!"
- set yaml value "messages.game.flag-captured" from file "../../BlockWars/messages.yml" to "FLAG CAPTURED//<player> &7has captured the <team> &7flag!"
- set yaml value "messages.pvp.kill-player" from file "../../BlockWars/messages.yml" to "<victim> &ewas killed by <attacker>&e!"
- set yaml value "messages.pvp.death-player" from file "../../BlockWars/messages.yml" to "<victim> &edied!"
- set yaml value "messages.pvp.respawn-screen" from file "../../BlockWars/messages.yml" to "&eRespawning in &6<time> &eseconds"
- set yaml value "messages.kit.kit-purchased" from file "../../BlockWars/messages.yml" to "&aPurchased <kit>!"
- set yaml value "messages.kit.kit-already-purchased" from file "../../BlockWars/messages.yml" to "&cYou have already purchased this kit!"
- set yaml value "messages.kit.kit-select-lobby" from file "../../BlockWars/messages.yml" to "&aYou have selected the kit <kit>!"
- set yaml value "messages.kit.kit-select-ingame" from file "../../BlockWars/messages.yml" to "&6Your kit will be delivered to respawn!"
- set yaml value "messages.win.red-win" from file "../../BlockWars/messages.yml" to "&cRed team &awon the game!"
- set yaml value "messages.win.blue-win" from file "../../BlockWars/messages.yml" to "&9Blue team &awon the game!"
- set yaml value "messages.win.tie-win" from file "../../BlockWars/messages.yml" to "&aThe game has ended in a tie!"
- set {bw.config-msg::kit::kit-purchased} to yaml value "messages.kit.kit-purchased" from file "../../BlockWars/messages.yml"
- set {bw.config-msg::kit::kit-already-purchased} to yaml value "messages.kit.kit-already-purchased" from file "../../BlockWars/messages.yml"
- set {bw.config-msg::kit::kit-select-lobby} to yaml value "messages.kit.kit-select-lobby" from file "../../BlockWars/messages.yml"
- set {bw.config-msg::kit::kit-select-ingame} to yaml value "messages.kit.kit-select-ingame" from file "../../BlockWars/messages.yml"
- set {bw.config-msg::win::red-win} to yaml value "messages.win.red-win" from file "../../BlockWars/messages.yml"
- set {bw.config-msg::win::blue-win} to yaml value "messages.win.blue-win" from file "../../BlockWars/messages.yml"
- set {bw.config-msg::win::tie-game} to yaml value "messages.win.tie-win" from file "../../BlockWars/messages.yml"
- set {bw.config-msg::pvp::kill-player} to yaml value "messages.pvp.kill-player" from file "../../BlockWars/messages.yml"
- set {bw.config-msg::pvp::death-player} to yaml value "messages.pvp.death-player" from file "../../BlockWars/messages.yml"
- set {bw.config-msg::pvp::respawn-screen} to yaml value "messages.pvp.respawn-screen" from file "../../BlockWars/messages.yml"
- set {bw.config-msg::phase::phase-build} to yaml value "messages.phase.phase-build" from file "../../BlockWars/messages.yml"
- set {bw.config-msg::phase::phase-figth} to yaml value "messages.phase.phase-fight" from file "../../BlockWars/messages.yml"
- set {bw.config-msg::phase::phase-overtime} to yaml value "messages.phase.phase-overtime" from file "../../BlockWars/messages.yml"
- set {bw.config-msg::game::countdown-msg} to yaml value "messages.game.countdown-msg" from file "../../BlockWars/messages.yml"
- set {bw.config-msg::game::tostart} to yaml value "messages.game.toStart" from file "../../BlockWars/messages.yml"
- set {bw.config-msg::game::jointeam-red} to yaml value "messages.game.jointeam-red" from file "../../BlockWars/messages.yml"
- set {bw.config-msg::game::jointeam-blue} to yaml value "messages.game.jointeam-blue" from file "../../BlockWars/messages.yml"
- set {bw.config-msg::game::phasestart-build} to yaml value "messages.game.phasestart-build" from file "../../BlockWars/messages.yml"
- set {bw.config-msg::game::phasestart-figth} to yaml value "messages.game.phasestart-fight" from file "../../BlockWars/messages.yml"
- set {bw.config-msg::game::phasestart-overtime} to yaml value "messages.game.phasestart-overtime" from file "../../BlockWars/messages.yml"
- set {bw.config-msg::game::flag-taken} to yaml value "messages.game.flag-taken" from file "../../BlockWars/messages.yml"
- set {bw.config-msg::game::flag-dropped} to yaml value "messages.game.flag-dropped" from file "../../BlockWars/messages.yml"
- set {bw.config-msg::game::flag-captured} to yaml value "messages.game.flag-captured" from file "../../BlockWars/messages.yml"
- set {bw.config-msg::listener::join-broad} to yaml value "messages.listener.join-broad" from file "../../BlockWars/messages.yml"
- set {bw.config-msg::listener::leave-broad-lobby} to yaml value "messages.listener.leave-broad-lobby" from file "../../BlockWars/messages.yml"
- set {bw.config-msg::listener::leave-broad-ingame} to yaml value "messages.listener.leave-broad-ingame" from file "../../BlockWars/messages.yml"
- set {bw.config-msg::listener::leave-msg} to yaml value "messages.listener.leave-msg" from file "../../BlockWars/messages.yml"
- set {bw.config-msg::error::no-permission} to yaml value "messages.error.no-permission" from file "../../BlockWars/messages.yml"
- set {bw.config-msg::error::kit-no-permission} to yaml value "messages.error.kit-no-permission" from file "../../BlockWars/messages.yml"
- set {bw.config-msg::error::no-ingame} to yaml value "messages.error.no-ingame" from file "../../BlockWars/messages.yml"
- set {bw.config-msg::error::ingame} to yaml value "messages.error.ingame" from file "../../BlockWars/messages.yml"
- set {bw.config-msg::error::full-game} to yaml value "messages.error.full-game" from file "../../BlockWars/messages.yml"
- set {bw.config-msg::error::not-available} to yaml value "messages.error.not-available" from file "../../BlockWars/messages.yml"
- set {bw.config-msg::error::not-exist} to yaml value "messages.error.not-exist" from file "../../BlockWars/messages.yml"
- set {bw.config-msg::error::stop-arena} to yaml value "messages.error.stop-arena" from file "../../BlockWars/messages.yml"
- set {bw.config-msg::error::no-min-players} to yaml value "messages.error.no-min-players" from file "../../BlockWars/messages.yml"
- set {bw.config-msg::error::no-build} to yaml value "messages.error.no-build" from file "../../BlockWars/messages.yml"
- set {bw.config-msg::error::no-break} to yaml value "messages.error.no-break" from file "../../BlockWars/messages.yml"
- set {bw.config-msg::error::kit-not-bought} to yaml value "messages.error.kit-not-bought" from file "../../BlockWars/messages.yml"
- set {bw.config-msg::error::no-money} to yaml value "messages.error.no-money" from file "../../BlockWars/messages.yml"
- set {bw.config-msg::error::capture-own-flag} to yaml value "messages.error.capture-own-flag" from file "../../BlockWars/messages.yml"
- set {bw.config-msg::error::damage-own-team} to yaml value "messages.error.damage-own-team" from file "../../BlockWars/messages.yml"
- set {bw.config-msg::error::full-team} to yaml value "messages.error.full-team" from file "../../BlockWars/messages.yml"
- if existence of "plugins/BlockWars/sign.yml" is false:
- send "%{bw.config::prefix}% &2File sign.yml create!" to {_sender}
- create file "plugins/BlockWars/sign.yml"
- wf "## BlockWars MINIGAME - Sign ##" to "plugins/BlockWars/sign.yml"
- set yaml value "sign.lines.header" from file "../../BlockWars/sign.yml" to "&0&lBlockWars"
- set yaml value "sign.status.waiting" from file "../../BlockWars/sign.yml" to "&aWaiting"
- set yaml value "sign.status.starting" from file "../../BlockWars/sign.yml" to "&6Starting"
- set yaml value "sign.status.ingame" from file "../../BlockWars/sign.yml" to "&cIngame"
- set yaml value "sign.status.rebuild" from file "../../BlockWars/sign.yml" to "&5Rebuild"
- set yaml value "sign.status.notready" from file "../../BlockWars/sign.yml" to "&4NotReady"
- set yaml value "sign.block-change.enable" from file "../../BlockWars/sign.yml" to "true"
- set yaml value "sign.block-change.blocks.waiting" from file "../../BlockWars/sign.yml" to "95:5"
- set yaml value "sign.block-change.blocks.starting" from file "../../BlockWars/sign.yml" to "95:4"
- set yaml value "sign.block-change.blocks.ingame" from file "../../BlockWars/sign.yml" to "95:14"
- set yaml value "sign.block-change.blocks.rebuild" from file "../../BlockWars/sign.yml" to "95:10"
- set yaml value "sign.block-change.blocks.notready" from file "../../BlockWars/sign.yml" to "95:15"
- set {bw.config::sign::header} to yaml value "sign.lines.header" from file "../../BlockWars/sign.yml"
- set {bw.config::sign::waiting} to yaml value "sign.status.waiting" from file "../../BlockWars/sign.yml"
- set {bw.config::sign::starting} to yaml value "sign.status.starting" from file "../../BlockWars/sign.yml"
- set {bw.config::sign::gingame} to yaml value "sign.status.ingame" from file "../../BlockWars/sign.yml"
- set {bw.config::sign::rebuild} to yaml value "sign.status.rebuild" from file "../../BlockWars/sign.yml"
- set {bw.config::sign::notready} to yaml value "sign.status.notready" from file "../../BlockWars/sign.yml"
- set {bw.config::sign-block.enable} to yaml value "sign.block-change.enable" from file "../../BlockWars/sign.yml"
- set {bw.config::sign-block.waiting} to yaml value "sign.block-change.blocks.waiting" from file "../../BlockWars/sign.yml"
- set {bw.config::sign-block.starting} to yaml value "sign.block-change.blocks.starting" from file "../../BlockWars/sign.yml"
- set {bw.config::sign-block.gingame} to yaml value "sign.block-change.blocks.ingame" from file "../../BlockWars/sign.yml"
- set {bw.config::sign-block.rebuild} to yaml value "sign.block-change.blocks.rebuild" from file "../../BlockWars/sign.yml"
- set {bw.config::sign-block.notready} to yaml value "sign.block-change.blocks.notready" from file "../../BlockWars/sign.yml"
- if existence of "plugins/BlockWars/kits.yml" is false:
- send "%{bw.config::prefix}% &2File kits.yml create!" to {_sender}
- create file "plugins/BlockWars/kits.yml"
- set yaml value "config.kits.warrior.name" from file "../../BlockWars/kits.yml" to "Warrior"
- set yaml value "config.kits.warrior.lore" from file "../../BlockWars/kits.yml" to "&7- &aStone sword//&7- &aBow &7(3 arrows)//&7- &aLeather chestplate//&7- &aLeather leggings//&7- &aWooden pickaxe"
- set yaml value "config.kits.warrior.icon" from file "../../BlockWars/kits.yml" to "1 272:0"
- set yaml value "config.kits.warrior.purchase" from file "../../BlockWars/kits.yml" to "false"
- set yaml value "config.kits.warrior.price" from file "../../BlockWars/kits.yml" to "0"
- set yaml value "config.kits.warrior.armour.helmet" from file "../../BlockWars/kits.yml" to "0:0"
- set yaml value "config.kits.warrior.armour.chestplate" from file "../../BlockWars/kits.yml" to "299:0"
- set yaml value "config.kits.warrior.armour.leggings" from file "../../BlockWars/kits.yml" to "300:0"
- set yaml value "config.kits.warrior.armour.boots" from file "../../BlockWars/kits.yml" to "0:0"
- set yaml value "config.kits.warrior.items.1 272:0" from file "../../BlockWars/kits.yml" to ""
- set yaml value "config.kits.warrior.items.1 270:0" from file "../../BlockWars/kits.yml" to ""
- set yaml value "config.kits.warrior.items.1 261:0" from file "../../BlockWars/kits.yml" to ""
- set yaml value "config.kits.warrior.items.3 262:0" from file "../../BlockWars/kits.yml" to ""
- set yaml value "config.kits.archer.name" from file "../../BlockWars/kits.yml" to "Archer"
- set yaml value "config.kits.archer.lore" from file "../../BlockWars/kits.yml" to "&7- &aKnockback stick//&7- &aChain chestplate//&7- &aBow &7(20 arrows)//&7- &aWooden pickaxe"
- set yaml value "config.kits.archer.icon" from file "../../BlockWars/kits.yml" to "1 261:0"
- set yaml value "config.kits.archer.purchase" from file "../../BlockWars/kits.yml" to "false"
- set yaml value "config.kits.archer.price" from file "../../BlockWars/kits.yml" to "0"
- set yaml value "config.kits.archer.armour.helmet" from file "../../BlockWars/kits.yml" to "0:0"
- set yaml value "config.kits.archer.armour.chestplate" from file "../../BlockWars/kits.yml" to "303:0"
- set yaml value "config.kits.archer.armour.leggings" from file "../../BlockWars/kits.yml" to "0:0"
- set yaml value "config.kits.archer.armour.boots" from file "../../BlockWars/kits.yml" to "0:0"
- set yaml value "config.kits.archer.items.1 blaze rod of knockback 2" from file "../../BlockWars/kits.yml" to ""
- set yaml value "config.kits.archer.items.1 270:0" from file "../../BlockWars/kits.yml" to ""
- set yaml value "config.kits.archer.items.1 261:0" from file "../../BlockWars/kits.yml" to ""
- set yaml value "config.kits.archer.items.20 262:0" from file "../../BlockWars/kits.yml" to ""
- set yaml value "config.kits.runner.name" from file "../../BlockWars/kits.yml" to "Runner"
- set yaml value "config.kits.runner.lore" from file "../../BlockWars/kits.yml" to "&7- &aLeather chestplate//&7- &aLeather leggings//&7- &aSpeed II//&7- &aWood sword//&7- &aWooden pickaxe"
- set yaml value "config.kits.runner.icon" from file "../../BlockWars/kits.yml" to "1 373:8194"
- set yaml value "config.kits.runner.purchase" from file "../../BlockWars/kits.yml" to "false"
- set yaml value "config.kits.runner.price" from file "../../BlockWars/kits.yml" to "0"
- set yaml value "config.kits.runner.armour.helmet" from file "../../BlockWars/kits.yml" to "0:0"
- set yaml value "config.kits.runner.armour.chestplate" from file "../../BlockWars/kits.yml" to "299:0"
- set yaml value "config.kits.runner.armour.leggings" from file "../../BlockWars/kits.yml" to "300:0"
- set yaml value "config.kits.runner.armour.boots" from file "../../BlockWars/kits.yml" to "0:0"
- set yaml value "config.kits.runner.items.1 268:0" from file "../../BlockWars/kits.yml" to ""
- set yaml value "config.kits.runner.items.1 270:0" from file "../../BlockWars/kits.yml" to ""
- set yaml value "config.kits.runner.items.1 373:8194" from file "../../BlockWars/kits.yml" to ""
- set yaml value "config.kits.miner.name" from file "../../BlockWars/kits.yml" to "Miner"
- set yaml value "config.kits.miner.lore" from file "../../BlockWars/kits.yml" to "&7- &aWood sword//&7- &aLeather armor//&7- &aBow &7(3 arrows)//&7- &aStone pickaxe &7(drops blocks)"
- set yaml value "config.kits.miner.icon" from file "../../BlockWars/kits.yml" to "1 274:0"
- set yaml value "config.kits.miner.purchase" from file "../../BlockWars/kits.yml" to "true"
- set yaml value "config.kits.miner.price" from file "../../BlockWars/kits.yml" to "200"
- set yaml value "config.kits.miner.armour.helmet" from file "../../BlockWars/kits.yml" to "301:0"
- set yaml value "config.kits.miner.armour.chestplate" from file "../../BlockWars/kits.yml" to "299:0"
- set yaml value "config.kits.miner.armour.leggings" from file "../../BlockWars/kits.yml" to "300:0"
- set yaml value "config.kits.miner.armour.boots" from file "../../BlockWars/kits.yml" to "298:0"
- set yaml value "config.kits.miner.items.1 268:0" from file "../../BlockWars/kits.yml" to ""
- set yaml value "config.kits.miner.items.1 274:0" from file "../../BlockWars/kits.yml" to ""
- set yaml value "config.kits.miner.items.1 261:0" from file "../../BlockWars/kits.yml" to ""
- set yaml value "config.kits.miner.items.3 262:0" from file "../../BlockWars/kits.yml" to ""
- set yaml value "config.kits.tank.name" from file "../../BlockWars/kits.yml" to "Tank"
- set yaml value "config.kits.tank.lore" from file "../../BlockWars/kits.yml" to "&7- &aIron chestplate//&7- &aIron leggings//&7- &aBow &7(2 arrows)//&7- &aWooden pickaxe"
- set yaml value "config.kits.tank.icon" from file "../../BlockWars/kits.yml" to "1 307:0"
- set yaml value "config.kits.tank.purchase" from file "../../BlockWars/kits.yml" to "true"
- set yaml value "config.kits.tank.price" from file "../../BlockWars/kits.yml" to "600"
- set yaml value "config.kits.tank.armour.helmet" from file "../../BlockWars/kits.yml" to "0:0"
- set yaml value "config.kits.tank.armour.chestplate" from file "../../BlockWars/kits.yml" to "307:0"
- set yaml value "config.kits.tank.armour.leggings" from file "../../BlockWars/kits.yml" to "308:0"
- set yaml value "config.kits.tank.armour.boots" from file "../../BlockWars/kits.yml" to "0:0"
- set yaml value "config.kits.tank.items.1 270:0" from file "../../BlockWars/kits.yml" to ""
- set yaml value "config.kits.tank.items.1 261:0" from file "../../BlockWars/kits.yml" to ""
- set yaml value "config.kits.tank.items.2 262:0" from file "../../BlockWars/kits.yml" to ""
- set yaml value "config.kits.builder.name" from file "../../BlockWars/kits.yml" to "Builder"
- set yaml value "config.kits.builder.lore" from file "../../BlockWars/kits.yml" to "&7- &aWood sword//&7- &aLeather chestplate//&7- &aBow &7(3 arrows)//&7- &a5 blocks per respawn//&7- &aWooden pickaxe"
- set yaml value "config.kits.builder.icon" from file "../../BlockWars/kits.yml" to "1 159:4"
- set yaml value "config.kits.builder.purchase" from file "../../BlockWars/kits.yml" to "true"
- set yaml value "config.kits.builder.price" from file "../../BlockWars/kits.yml" to "350"
- set yaml value "config.kits.builder.armour.helmet" from file "../../BlockWars/kits.yml" to "0:0"
- set yaml value "config.kits.builder.armour.chestplate" from file "../../BlockWars/kits.yml" to "299:0"
- set yaml value "config.kits.builder.armour.leggings" from file "../../BlockWars/kits.yml" to "0:0"
- set yaml value "config.kits.builder.armour.boots" from file "../../BlockWars/kits.yml" to "0:0"
- set yaml value "config.kits.builder.items.1 268:0" from file "../../BlockWars/kits.yml" to ""
- set yaml value "config.kits.builder.items.1 270:0" from file "../../BlockWars/kits.yml" to ""
- set yaml value "config.kits.builder.items.1 261:0" from file "../../BlockWars/kits.yml" to ""
- set yaml value "config.kits.builder.items.3 262:0" from file "../../BlockWars/kits.yml" to ""
- set yaml value "config.kits.builder.items.5 159:4" from file "../../BlockWars/kits.yml" to ""
- set yaml value "config.kits.jumper.name" from file "../../BlockWars/kits.yml" to "Jumper"
- set yaml value "config.kits.jumper.lore" from file "../../BlockWars/kits.yml" to "&7- &aWood sword//&7- &aLeather armor//&7- &aBow &7(1 arrows)//&7- &aJump bost II"
- set yaml value "config.kits.jumper.icon" from file "../../BlockWars/kits.yml" to "1 301:0"
- set yaml value "config.kits.jumper.purchase" from file "../../BlockWars/kits.yml" to "true"
- set yaml value "config.kits.jumper.price" from file "../../BlockWars/kits.yml" to "600"
- set yaml value "config.kits.jumper.armour.helmet" from file "../../BlockWars/kits.yml" to "298:0"
- set yaml value "config.kits.jumper.armour.chestplate" from file "../../BlockWars/kits.yml" to "299:0"
- set yaml value "config.kits.jumper.armour.leggings" from file "../../BlockWars/kits.yml" to "300:0"
- set yaml value "config.kits.jumper.armour.boots" from file "../../BlockWars/kits.yml" to "301:0"
- set yaml value "config.kits.jumper.items.1 268:0" from file "../../BlockWars/kits.yml" to ""
- set yaml value "config.kits.jumper.items.1 261:0" from file "../../BlockWars/kits.yml" to ""
- set yaml value "config.kits.jumper.items.1 262:0" from file "../../BlockWars/kits.yml" to ""
- set yaml value "config.kits.jumper.items.1 373:8235" from file "../../BlockWars/kits.yml" to ""
- if existence of "plugins/BlockWars/rewards.yml" is false:
- send "%{bw.config::prefix}% &2File rewards.yml create!" to {_sender}
- create file "plugins/BlockWars/rewards.yml"
- set yaml value "config.rewards.win.money.enable" from file "../../BlockWars/rewards.yml" to "true"
- set yaml value "config.rewards.win.money.amount" from file "../../BlockWars/rewards.yml" to "15"
- set yaml value "config.rewards.win.command.enable" from file "../../BlockWars/rewards.yml" to "false"
- set yaml value "config.rewards.win.command.cmd" from file "../../BlockWars/rewards.yml" to "give <player> diamond 5"
- set yaml value "config.rewards.win.message.enable" from file "../../BlockWars/rewards.yml" to "true"
- set yaml value "config.rewards.win.message.msg" from file "../../BlockWars/rewards.yml" to "&6+15 points"
- set yaml value "config.rewards.capture.money.enable" from file "../../BlockWars/rewards.yml" to "true"
- set yaml value "config.rewards.capture.money.amount" from file "../../BlockWars/rewards.yml" to "10"
- set yaml value "config.rewards.capture.command.enable" from file "../../BlockWars/rewards.yml" to "false"
- set yaml value "config.rewards.capture.command.cmd" from file "../../BlockWars/rewards.yml" to ""
- set yaml value "config.rewards.capture.message.enable" from file "../../BlockWars/rewards.yml" to "true"
- set yaml value "config.rewards.capture.message.msg" from file "../../BlockWars/rewards.yml" to "&6+10 points"
- set yaml value "config.rewards.dropped.money.enable" from file "../../BlockWars/rewards.yml" to "true"
- set yaml value "config.rewards.dropped.money.amount" from file "../../BlockWars/rewards.yml" to "5"
- set yaml value "config.rewards.dropped.command.enable" from file "../../BlockWars/rewards.yml" to "false"
- set yaml value "config.rewards.dropped.command.cmd" from file "../../BlockWars/rewards.yml" to ""
- set yaml value "config.rewards.dropped.message.enable" from file "../../BlockWars/rewards.yml" to "true"
- set yaml value "config.rewards.dropped.message.msg" from file "../../BlockWars/rewards.yml" to "&6+5 points"
- set yaml value "config.rewards.kill.money.enable" from file "../../BlockWars/rewards.yml" to "true"
- set yaml value "config.rewards.kill.money.amount" from file "../../BlockWars/rewards.yml" to "5"
- set yaml value "config.rewards.kill.command.enable" from file "../../BlockWars/rewards.yml" to "false"
- set yaml value "config.rewards.kill.command.cmd" from file "../../BlockWars/rewards.yml" to ""
- set yaml value "config.rewards.kill.message.enable" from file "../../BlockWars/rewards.yml" to "true"
- set yaml value "config.rewards.kill.message.msg" from file "../../BlockWars/rewards.yml" to "&6+5 points"
- set yaml value "config.rewards.participation.money.enable" from file "../../BlockWars/rewards.yml" to "true"
- set yaml value "config.rewards.participation.money.amount" from file "../../BlockWars/rewards.yml" to "1"
- set yaml value "config.rewards.participation.command.enable" from file "../../BlockWars/rewards.yml" to "false"
- set yaml value "config.rewards.participation.command.cmd" from file "../../BlockWars/rewards.yml" to ""
- set yaml value "config.rewards.participation.message.enable" from file "../../BlockWars/rewards.yml" to "false"
- set yaml value "config.rewards.participation.message.msg" from file "../../BlockWars/rewards.yml" to "&6+1 point"
- if existence of "plugins/BlockWars/scoreboard.yml" is false:
- send "%{bw.config::prefix}% &2File scoreboard.yml create!" to {_sender}
- create file "plugins/BlockWars/scoreboard.yml"
- wf "## BlockWars MINIGAME - Scoreboard ##" to "plugins/BlockWars/scoreboard.yml"
- wf "## Lobby Variables: <arena> - <amount> - <max> - <empty> ##" to "plugins/BlockWars/scoreboard.yml"
- wf "## Ingame Variables: <arena> - <amount> - <max> - <phase> - <time> - <blue-flag-captured> - <red-flag-captured> - <empty> ##" to "plugins/BlockWars/scoreboard.yml"
- wf "## Maximum 40 characters per line ##" to "plugins/BlockWars/scoreboard.yml"
- set yaml value "scoreboard.lobby.title" from file "../../BlockWars/scoreboard.yml" to "&e&lBlockWars"
- add "&2Map" to yaml list "scoreboard.lobby.lines" from file "../../BlockWars/scoreboard.yml"
- add "&f<arena>" to yaml list "scoreboard.lobby.lines" from file "../../BlockWars/scoreboard.yml"
- add "<empty>" to yaml list "scoreboard.lobby.lines" from file "../../BlockWars/scoreboard.yml"
- add "&2Players" to yaml list "scoreboard.lobby.lines" from file "../../BlockWars/scoreboard.yml"
- add "&f<amount>/<max>" to yaml list "scoreboard.lobby.lines" from file "../../BlockWars/scoreboard.yml"
- add "<empty>" to yaml list "scoreboard.lobby.lines" from file "../../BlockWars/scoreboard.yml"
- add "&fwww.mc-server.com" to yaml list "scoreboard.lobby.lines" from file "../../BlockWars/scoreboard.yml"
- set yaml value "scoreboard.ingame.title" from file "../../BlockWars/scoreboard.yml" to "&e&lBlockWars"
- add "<phase>&7: <time>" to yaml list "scoreboard.ingame.lines" from file "../../BlockWars/scoreboard.yml"
- add "<empty>" to yaml list "scoreboard.ingame.lines" from file "../../BlockWars/scoreboard.yml"
- add "&9Blue&7: <blue-flag-captured> captures" to yaml list "scoreboard.ingame.lines" from file "../../BlockWars/scoreboard.yml"
- add "&cRed&7: <red-flag-captured> captures" to yaml list "scoreboard.ingame.lines" from file "../../BlockWars/scoreboard.yml"
- add "<empty>" to yaml list "scoreboard.ingame.lines" from file "../../BlockWars/scoreboard.yml"
- add "&fwww.mc-server.com" to yaml list "scoreboard.ingame.lines" from file "../../BlockWars/scoreboard.yml"
- set {bw.config::scoreboard-lobby::title} to yaml value "scoreboard.lobby.title" from file "../../BlockWars/scoreboard.yml"
- set {bw.config::scoreboard-lobby::lines::*} to yaml list "scoreboard.lobby.lines" from file "../../BlockWars/scoreboard.yml"
- set {bw.config::scoreboard-ingame::title} to yaml value "scoreboard.ingame.title" from file "../../BlockWars/scoreboard.yml"
- set {bw.config::scoreboard-ingame::lines::*} to yaml list "scoreboard.ingame.lines" from file "../../BlockWars/scoreboard.yml"
- send "&aReload successfully!" to {_sender}
Advertisement
Add Comment
Please, Sign In to add comment