Oxalist

Untitled

Dec 11th, 2017
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 171.26 KB | None | 0 0
  1. options:
  2. VersionID: 3.6
  3. aliases:
  4. brojo = 425:1
  5. bazul = 425:4
  6. redglass = 95:14
  7. blueglass = 95:11
  8.  
  9. on load:
  10. if text from "http://pastebin.com/raw/7B4aA8fD" is not "{@VersionID}":
  11. send "%{bw.config::prefix}% &aNew version available!" to console
  12.  
  13. on join:
  14. if player has permission "blockwars.admin":
  15. if text from "http://pastebin.com/raw/7B4aA8fD" is not "{@VersionID}":
  16. send "%{bw.config::prefix}% &aNew version available!"
  17.  
  18. on load:
  19. if existence of "plugins/BlockWars/version.txt" is false:
  20. wait 3 ticks
  21. create file "plugins/BlockWars/version.txt"
  22. set yaml value "version" from file "../../BlockWars/version.txt" to "{@VersionID}"
  23. else:
  24. set {_ver} to text from "http://pastebin.com/raw/7B4aA8fD"
  25. if {_ver} is set:
  26. set {_actual} to yaml value "version" from file "../../BlockWars/version.txt"
  27. if {_ver} is not {_actual}:
  28. delete file "plugins/BlockWars/config.yml"
  29. delete file "plugins/BlockWars/message.yml"
  30. delete file "plugins/BlockWars/sign.yml"
  31. delete file "plugins/BlockWars/kits.yml"
  32. delete file "plugins/BlockWars/rewards.yml"
  33. delete file "plugins/BlockWars/scoreboard.yml"
  34. delete file "plugins/BlockWars/version.txt"
  35. send "%{bw.config::prefix}% &aAll config files has bee updated! If no files generated use /blockwars reload." to console
  36. send "%{bw.config::prefix}% &aAll config files has bee updated! If no files generated use /blockwars reload." to all ops
  37. else:
  38. send "%{bw.config::prefix}% &cIt not has been possible to connect to internet!" to console
  39. send "%{bw.config::prefix}% &cIt not has been possible to connect to internet!" to all ops
  40.  
  41. on load:
  42. if existence of "plugins/BlockWars/config.yml" is false:
  43. create file "plugins/BlockWars/config.yml"
  44. wf "## Block Wars MINIGAME - Configuration ##" to "plugins/BlockWars/config.yml"
  45. set yaml value "config.prefix" from file "../../BlockWars/config.yml" to "&7[&2BlockWars&7]"
  46. set yaml value "config.rebuild-map-delay" from file "../../BlockWars/config.yml" to "3 seconds"
  47. set yaml value "config.regeneration-effect" from file "../../BlockWars/config.yml" to "true"
  48. 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>"
  49. set yaml value "config.defaults.default_min_players" from file "../../BlockWars/config.yml" to "4"
  50. set yaml value "config.defaults.default_players_per_team" from file "../../BlockWars/config.yml" to "6"
  51. set yaml value "config.commands.leave" from file "../../BlockWars/config.yml" to "leave"
  52. set yaml value "config.countdown.lobby" from file "../../BlockWars/config.yml" to "20"
  53. set yaml value "config.chat.lobby" from file "../../BlockWars/config.yml" to "&7<player>: <msg>"
  54. set yaml value "config.chat.team" from file "../../BlockWars/config.yml" to "&b[Team] &e<player>&f: &7<msg>"
  55. set yaml value "config.chat.global" from file "../../BlockWars/config.yml" to "&4[Global] &e<player>&f: &7<msg>"
  56. set yaml value "config.kits.title" from file "../../BlockWars/config.yml" to "&8Kit Selection"
  57. set yaml value "config.kits.villager-name" from file "../../BlockWars/config.yml" to "&aKits"
  58. set yaml value "config.shop.title" from file "../../BlockWars/config.yml" to "&0BlockWars Shop"
  59. set yaml value "config.items.kits.id" from file "../../BlockWars/config.yml" to "339:0"
  60. set yaml value "config.items.kits.name" from file "../../BlockWars/config.yml" to "&aKit Selection"
  61. set yaml value "config.items.kits.slot" from file "../../BlockWars/config.yml" to "1"
  62. set yaml value "config.items.select-team.id" from file "../../BlockWars/config.yml" to "399:0"
  63. set yaml value "config.items.select-team.name" from file "../../BlockWars/config.yml" to "&aTeam Selection"
  64. set yaml value "config.items.select-team.slot" from file "../../BlockWars/config.yml" to "0"
  65. set yaml value "config.items.leave.id" from file "../../BlockWars/config.yml" to "331:0"
  66. set yaml value "config.items.leave.name" from file "../../BlockWars/config.yml" to "&cLeave the game"
  67. set yaml value "config.items.leave.slot" from file "../../BlockWars/config.yml" to "8"
  68. set {bw.config::prefix} to yaml value "config.prefix" from file "../../BlockWars/config.yml"
  69. set {bw.config::rebuild-map-delay} to yaml value "config.rebuild-map-delay" from file "../../BlockWars/config.yml"
  70. set {bw.config::rebuild-map-delay} to {bw.config::rebuild-map-delay} parsed as timespan
  71. set {bw.config::config::regeneration-effect} to yaml value "config.regeneration-effect" from file "../../BlockWars/config.yml"
  72. set {bw.config::hologram::stats-holo} to yaml value "config.holo-stats" from file "../../BlockWars/config.yml"
  73. set {bw.config::config::default_min_players} to yaml value "config.defaults.default_min_players" from file "../../BlockWars/config.yml"
  74. set {bw.config::config::default_min_players} to {bw.config::config::default_min_players} parsed as integer
  75. set {bw.config::config::default_players_per_team} to yaml value "config.defaults.default_players_per_team" from file "../../BlockWars/config.yml"
  76. set {bw.config::config::default_players_per_team} to {bw.config::config::default_players_per_team} parsed as integer
  77. set {bw.config::leave-cmd} to yaml value "config.commands.leave" from file "../../BlockWars/config.yml"
  78. set {bw.config::config::countdown} to yaml value "config.countdown.lobby" from file "../../BlockWars/config.yml"
  79. set {bw.config::config::countdown} to {bw.config::config::countdown} parsed as integer
  80. set {bw.config::chat::lobby-chat} to yaml value "config.chat.lobby" from file "../../BlockWars/config.yml"
  81. set {bw.config::chat::team-chat} to yaml value "config.chat.team" from file "../../BlockWars/config.yml"
  82. set {bw.config::chat::global-chat} to yaml value "config.chat.global" from file "../../BlockWars/config.yml"
  83. set {bw.config::kit::title-gui} to yaml value "config.kits.title" from file "../../BlockWars/config.yml"
  84. set {bw.config::kit::villager-name} to yaml value "config.kits.villager-name" from file "../../BlockWars/config.yml"
  85. set {bw.config::shop::shop-title-gui} to yaml value "config.shop.title" from file "../../BlockWars/config.yml"
  86. set {bw.config::item::kit-item-id} to yaml value "config.items.kits.id" from file "../../BlockWars/config.yml"
  87. set {bw.config::item::kit-item-id} to {bw.config::item::kit-item-id} parsed as item
  88. set {bw.config::item::kit-item-name} to yaml value "config.items.kits.name" from file "../../BlockWars/config.yml"
  89. set {bw.config::item::kit-item-slot} to yaml value "config.items.kits.slot" from file "../../BlockWars/config.yml"
  90. set {bw.config::item::kit-item-slot} to {bw.config::item::kit-item-slot} parsed as integer
  91. set {bw.config::item::team-item-id} to yaml value "config.items.select-team.id" from file "../../BlockWars/config.yml"
  92. set {bw.config::item::team-item-id} to {bw.config::item::team-item-id} parsed as item
  93. set {bw.config::item::team-item-name} to yaml value "config.items.select-team.name" from file "../../BlockWars/config.yml"
  94. set {bw.config::item::team-item-slot} to yaml value "config.items.select-team.slot" from file "../../BlockWars/config.yml"
  95. set {bw.config::item::team-item-slot} to {bw.config::item::team-item-slot} parsed as integer
  96. set {bw.config::item::leave-item-id} to yaml value "config.items.leave.id" from file "../../BlockWars/config.yml"
  97. set {bw.config::item::leave-item-id} to {bw.config::item::leave-item-id} parsed as item
  98. set {bw.config::item::leave-item-name} to yaml value "config.items.leave.name" from file "../../BlockWars/config.yml"
  99. set {bw.config::item::leave-item-slot} to yaml value "config.items.leave.slot" from file "../../BlockWars/config.yml"
  100. set {bw.config::item::leave-item-slot} to {bw.config::item::leave-item-slot} parsed as integer
  101.  
  102. on load:
  103. if existence of "plugins/BlockWars/messages.yml" is false:
  104. create file "plugins/BlockWars/messages.yml"
  105. wf "## Block Wars MINIGAME - Messages ##" to "plugins/BlockWars/messages.yml"
  106. set yaml value "messages.error.no-permission" from file "../../BlockWars/messages.yml" to "&cYou do not have permission to do this!"
  107. set yaml value "messages.error.kit-no-permission" from file "../../BlockWars/messages.yml" to "&cYou do not have permission to select this kit!"
  108. set yaml value "messages.error.kit-not-bought" from file "../../BlockWars/messages.yml" to "&cYou have not bought this kit!"
  109. set yaml value "messages.error.no-money" from file "../../BlockWars/messages.yml" to "&cYou do not have enough money!"
  110. set yaml value "messages.error.no-ingame" from file "../../BlockWars/messages.yml" to "&cYou are not a game!"
  111. set yaml value "messages.error.ingame" from file "../../BlockWars/messages.yml" to "&cYou are in a game!"
  112. set yaml value "messages.error.full-game" from file "../../BlockWars/messages.yml" to "&cThis game is in progress!"
  113. set yaml value "messages.error.not-available" from file "../../BlockWars/messages.yml" to "&cThis game is not available!"
  114. set yaml value "messages.error.not-exist" from file "../../BlockWars/messages.yml" to "&cThis game does not exist!"
  115. set yaml value "messages.error.stop-arena" from file "../../BlockWars/messages.yml" to "&cThis play has been stopped!"
  116. 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!"
  117. set yaml value "messages.error.no-build" from file "../../BlockWars/messages.yml" to "&cYou cannot build here!"
  118. set yaml value "messages.error.no-break" from file "../../BlockWars/messages.yml" to "&cYou can only break the blocks placed!"
  119. set yaml value "messages.error.capture-own-flag" from file "../../BlockWars/messages.yml" to "&cYou can not take the flag of your team!"
  120. set yaml value "messages.error.damage-own-team" from file "../../BlockWars/messages.yml" to "&cYou can not attack your own team!"
  121. set yaml value "messages.error.full-team" from file "../../BlockWars/messages.yml" to "&cYou cannot join this team because it is full!"
  122. set yaml value "messages.listener.join-broad" from file "../../BlockWars/messages.yml" to "&5<player> joined the game. <amount>/<max>"
  123. set yaml value "messages.listener.leave-broad-lobby" from file "../../BlockWars/messages.yml" to "&6<player> left the game. <amount>/<max>"
  124. set yaml value "messages.listener.leave-broad-ingame" from file "../../BlockWars/messages.yml" to "&6<player> &eleft the game!"
  125. set yaml value "messages.listener.leave-msg" from file "../../BlockWars/messages.yml" to "&fYou have abandoned the game!"
  126. set yaml value "messages.phase.phase-build" from file "../../BlockWars/messages.yml" to "&a&lBUILD"
  127. set yaml value "messages.phase.phase-fight" from file "../../BlockWars/messages.yml" to "&c&lFIGTH"
  128. set yaml value "messages.phase.phase-overtime" from file "../../BlockWars/messages.yml" to "&4&lOVERTIME"
  129. set yaml value "messages.game.countdown-msg" from file "../../BlockWars/messages.yml" to "&9The game starting in <time> seconds!"
  130. set yaml value "messages.game.toStart" from file "../../BlockWars/messages.yml" to "&6Game will start!"
  131. set yaml value "messages.game.jointeam-red" from file "../../BlockWars/messages.yml" to "&aJoined team &cRed&a!"
  132. set yaml value "messages.game.jointeam-blue" from file "../../BlockWars/messages.yml" to "&aJoined team &9Blue&a!"
  133. set yaml value "messages.game.phasestart-build" from file "../../BlockWars/messages.yml" to "&6Build blocks around your flag!"
  134. set yaml value "messages.game.phasestart-fight" from file "../../BlockWars/messages.yml" to "&6Capture de other teams flags!"
  135. 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."
  136. set yaml value "messages.game.flag-taken" from file "../../BlockWars/messages.yml" to "FLAG TAKEN//<player> &7has taken the <team> &7flag!"
  137. set yaml value "messages.game.flag-dropped" from file "../../BlockWars/messages.yml" to "FLAG DROPPED//<player> &7has dropped the <team> &7flag!"
  138. set yaml value "messages.game.flag-captured" from file "../../BlockWars/messages.yml" to "FLAG CAPTURED//<player> &7has captured the <team> &7flag!"
  139. set yaml value "messages.pvp.kill-player" from file "../../BlockWars/messages.yml" to "<victim> &ewas killed by <attacker>&e!"
  140. set yaml value "messages.pvp.death-player" from file "../../BlockWars/messages.yml" to "<victim> &edied!"
  141. set yaml value "messages.pvp.respawn-screen" from file "../../BlockWars/messages.yml" to "&eRespawning in &6<time> &eseconds"
  142. set yaml value "messages.kit.kit-purchased" from file "../../BlockWars/messages.yml" to "&aPurchased <kit>!"
  143. set yaml value "messages.kit.kit-already-purchased" from file "../../BlockWars/messages.yml" to "&cYou have already purchased this kit!"
  144. set yaml value "messages.kit.kit-select-lobby" from file "../../BlockWars/messages.yml" to "&aYou have selected the kit <kit>!"
  145. set yaml value "messages.kit.kit-select-ingame" from file "../../BlockWars/messages.yml" to "&6Your kit will be delivered to respawn!"
  146. set yaml value "messages.win.red-win" from file "../../BlockWars/messages.yml" to "&cRed team &awon the game!"
  147. set yaml value "messages.win.blue-win" from file "../../BlockWars/messages.yml" to "&9Blue team &awon the game!"
  148. set yaml value "messages.win.tie-win" from file "../../BlockWars/messages.yml" to "&aThe game has ended in a tie!"
  149. set {bw.config-msg::kit::kit-purchased} to yaml value "messages.kit.kit-purchased" from file "../../BlockWars/messages.yml"
  150. set {bw.config-msg::kit::kit-already-purchased} to yaml value "messages.kit.kit-already-purchased" from file "../../BlockWars/messages.yml"
  151. set {bw.config-msg::kit::kit-select-lobby} to yaml value "messages.kit.kit-select-lobby" from file "../../BlockWars/messages.yml"
  152. set {bw.config-msg::kit::kit-select-ingame} to yaml value "messages.kit.kit-select-ingame" from file "../../BlockWars/messages.yml"
  153. set {bw.config-msg::win::red-win} to yaml value "messages.win.red-win" from file "../../BlockWars/messages.yml"
  154. set {bw.config-msg::win::blue-win} to yaml value "messages.win.blue-win" from file "../../BlockWars/messages.yml"
  155. set {bw.config-msg::win::tie-game} to yaml value "messages.win.tie-win" from file "../../BlockWars/messages.yml"
  156. set {bw.config-msg::pvp::kill-player} to yaml value "messages.pvp.kill-player" from file "../../BlockWars/messages.yml"
  157. set {bw.config-msg::pvp::death-player} to yaml value "messages.pvp.death-player" from file "../../BlockWars/messages.yml"
  158. set {bw.config-msg::pvp::respawn-screen} to yaml value "messages.pvp.respawn-screen" from file "../../BlockWars/messages.yml"
  159. set {bw.config-msg::phase::phase-build} to yaml value "messages.phase.phase-build" from file "../../BlockWars/messages.yml"
  160. set {bw.config-msg::phase::phase-figth} to yaml value "messages.phase.phase-fight" from file "../../BlockWars/messages.yml"
  161. set {bw.config-msg::phase::phase-overtime} to yaml value "messages.phase.phase-overtime" from file "../../BlockWars/messages.yml"
  162. set {bw.config-msg::game::countdown-msg} to yaml value "messages.game.countdown-msg" from file "../../BlockWars/messages.yml"
  163. set {bw.config-msg::game::tostart} to yaml value "messages.game.toStart" from file "../../BlockWars/messages.yml"
  164. set {bw.config-msg::game::jointeam-red} to yaml value "messages.game.jointeam-red" from file "../../BlockWars/messages.yml"
  165. set {bw.config-msg::game::jointeam-blue} to yaml value "messages.game.jointeam-blue" from file "../../BlockWars/messages.yml"
  166. set {bw.config-msg::game::phasestart-build} to yaml value "messages.game.phasestart-build" from file "../../BlockWars/messages.yml"
  167. set {bw.config-msg::game::phasestart-figth} to yaml value "messages.game.phasestart-fight" from file "../../BlockWars/messages.yml"
  168. set {bw.config-msg::game::phasestart-overtime} to yaml value "messages.game.phasestart-overtime" from file "../../BlockWars/messages.yml"
  169. set {bw.config-msg::game::flag-taken} to yaml value "messages.game.flag-taken" from file "../../BlockWars/messages.yml"
  170. set {bw.config-msg::game::flag-dropped} to yaml value "messages.game.flag-dropped" from file "../../BlockWars/messages.yml"
  171. set {bw.config-msg::game::flag-captured} to yaml value "messages.game.flag-captured" from file "../../BlockWars/messages.yml"
  172. set {bw.config-msg::listener::join-broad} to yaml value "messages.listener.join-broad" from file "../../BlockWars/messages.yml"
  173. set {bw.config-msg::listener::leave-broad-lobby} to yaml value "messages.listener.leave-broad-lobby" from file "../../BlockWars/messages.yml"
  174. set {bw.config-msg::listener::leave-broad-ingame} to yaml value "messages.listener.leave-broad-ingame" from file "../../BlockWars/messages.yml"
  175. set {bw.config-msg::listener::leave-msg} to yaml value "messages.listener.leave-msg" from file "../../BlockWars/messages.yml"
  176. set {bw.config-msg::error::no-permission} to yaml value "messages.error.no-permission" from file "../../BlockWars/messages.yml"
  177. set {bw.config-msg::error::kit-no-permission} to yaml value "messages.error.kit-no-permission" from file "../../BlockWars/messages.yml"
  178. set {bw.config-msg::error::no-ingame} to yaml value "messages.error.no-ingame" from file "../../BlockWars/messages.yml"
  179. set {bw.config-msg::error::ingame} to yaml value "messages.error.ingame" from file "../../BlockWars/messages.yml"
  180. set {bw.config-msg::error::full-game} to yaml value "messages.error.full-game" from file "../../BlockWars/messages.yml"
  181. set {bw.config-msg::error::not-available} to yaml value "messages.error.not-available" from file "../../BlockWars/messages.yml"
  182. set {bw.config-msg::error::not-exist} to yaml value "messages.error.not-exist" from file "../../BlockWars/messages.yml"
  183. set {bw.config-msg::error::stop-arena} to yaml value "messages.error.stop-arena" from file "../../BlockWars/messages.yml"
  184. set {bw.config-msg::error::no-min-players} to yaml value "messages.error.no-min-players" from file "../../BlockWars/messages.yml"
  185. set {bw.config-msg::error::no-build} to yaml value "messages.error.no-build" from file "../../BlockWars/messages.yml"
  186. set {bw.config-msg::error::no-break} to yaml value "messages.error.no-break" from file "../../BlockWars/messages.yml"
  187. set {bw.config-msg::error::kit-not-bought} to yaml value "messages.error.kit-not-bought" from file "../../BlockWars/messages.yml"
  188. set {bw.config-msg::error::no-money} to yaml value "messages.error.no-money" from file "../../BlockWars/messages.yml"
  189. set {bw.config-msg::error::capture-own-flag} to yaml value "messages.error.capture-own-flag" from file "../../BlockWars/messages.yml"
  190. set {bw.config-msg::error::damage-own-team} to yaml value "messages.error.damage-own-team" from file "../../BlockWars/messages.yml"
  191. set {bw.config-msg::error::full-team} to yaml value "messages.error.full-team" from file "../../BlockWars/messages.yml"
  192.  
  193. on load:
  194. if existence of "plugins/BlockWars/sign.yml" is false:
  195. create file "plugins/BlockWars/sign.yml"
  196. wf "## BlockWars MINIGAME - Sign ##" to "plugins/BlockWars/sign.yml"
  197. set yaml value "sign.lines.header" from file "../../BlockWars/sign.yml" to "&0&lBlockWars"
  198. set yaml value "sign.status.waiting" from file "../../BlockWars/sign.yml" to "&aWaiting"
  199. set yaml value "sign.status.starting" from file "../../BlockWars/sign.yml" to "&6Starting"
  200. set yaml value "sign.status.ingame" from file "../../BlockWars/sign.yml" to "&cIngame"
  201. set yaml value "sign.status.rebuild" from file "../../BlockWars/sign.yml" to "&5Rebuild"
  202. set yaml value "sign.status.notready" from file "../../BlockWars/sign.yml" to "&4NotReady"
  203. set yaml value "sign.block-change.enable" from file "../../BlockWars/sign.yml" to "true"
  204. set yaml value "sign.block-change.blocks.waiting" from file "../../BlockWars/sign.yml" to "95:5"
  205. set yaml value "sign.block-change.blocks.starting" from file "../../BlockWars/sign.yml" to "95:4"
  206. set yaml value "sign.block-change.blocks.ingame" from file "../../BlockWars/sign.yml" to "95:14"
  207. set yaml value "sign.block-change.blocks.rebuild" from file "../../BlockWars/sign.yml" to "95:10"
  208. set yaml value "sign.block-change.blocks.notready" from file "../../BlockWars/sign.yml" to "95:15"
  209. set {bw.config::sign::header} to yaml value "sign.lines.header" from file "../../BlockWars/sign.yml"
  210. set {bw.config::sign::waiting} to yaml value "sign.status.waiting" from file "../../BlockWars/sign.yml"
  211. set {bw.config::sign::starting} to yaml value "sign.status.starting" from file "../../BlockWars/sign.yml"
  212. set {bw.config::sign::gingame} to yaml value "sign.status.ingame" from file "../../BlockWars/sign.yml"
  213. set {bw.config::sign::rebuild} to yaml value "sign.status.rebuild" from file "../../BlockWars/sign.yml"
  214. set {bw.config::sign::notready} to yaml value "sign.status.notready" from file "../../BlockWars/sign.yml"
  215. set {bw.config::sign-block.enable} to yaml value "sign.block-change.enable" from file "../../BlockWars/sign.yml"
  216. set {bw.config::sign-block.waiting} to yaml value "sign.block-change.blocks.waiting" from file "../../BlockWars/sign.yml"
  217. set {bw.config::sign-block.starting} to yaml value "sign.block-change.blocks.starting" from file "../../BlockWars/sign.yml"
  218. set {bw.config::sign-block.gingame} to yaml value "sign.block-change.blocks.ingame" from file "../../BlockWars/sign.yml"
  219. set {bw.config::sign-block.rebuild} to yaml value "sign.block-change.blocks.rebuild" from file "../../BlockWars/sign.yml"
  220. set {bw.config::sign-block.notready} to yaml value "sign.block-change.blocks.notready" from file "../../BlockWars/sign.yml"
  221.  
  222. on load:
  223. if existence of "plugins/BlockWars/kits.yml" is false:
  224. create file "plugins/BlockWars/kits.yml"
  225. set yaml value "config.kits.warrior.name" from file "../../BlockWars/kits.yml" to "Warrior"
  226. 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"
  227. set yaml value "config.kits.warrior.icon" from file "../../BlockWars/kits.yml" to "1 272:0"
  228. set yaml value "config.kits.warrior.purchase" from file "../../BlockWars/kits.yml" to "false"
  229. set yaml value "config.kits.warrior.price" from file "../../BlockWars/kits.yml" to "0"
  230. set yaml value "config.kits.warrior.armour.helmet" from file "../../BlockWars/kits.yml" to "0:0"
  231. set yaml value "config.kits.warrior.armour.chestplate" from file "../../BlockWars/kits.yml" to "299:0"
  232. set yaml value "config.kits.warrior.armour.leggings" from file "../../BlockWars/kits.yml" to "300:0"
  233. set yaml value "config.kits.warrior.armour.boots" from file "../../BlockWars/kits.yml" to "0:0"
  234. set yaml value "config.kits.warrior.items.1 272:0" from file "../../BlockWars/kits.yml" to ""
  235. set yaml value "config.kits.warrior.items.1 270:0" from file "../../BlockWars/kits.yml" to ""
  236. set yaml value "config.kits.warrior.items.1 261:0" from file "../../BlockWars/kits.yml" to ""
  237. set yaml value "config.kits.warrior.items.3 262:0" from file "../../BlockWars/kits.yml" to ""
  238. set yaml value "config.kits.archer.name" from file "../../BlockWars/kits.yml" to "Archer"
  239. 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"
  240. set yaml value "config.kits.archer.icon" from file "../../BlockWars/kits.yml" to "1 261:0"
  241. set yaml value "config.kits.archer.purchase" from file "../../BlockWars/kits.yml" to "false"
  242. set yaml value "config.kits.archer.price" from file "../../BlockWars/kits.yml" to "0"
  243. set yaml value "config.kits.archer.armour.helmet" from file "../../BlockWars/kits.yml" to "0:0"
  244. set yaml value "config.kits.archer.armour.chestplate" from file "../../BlockWars/kits.yml" to "303:0"
  245. set yaml value "config.kits.archer.armour.leggings" from file "../../BlockWars/kits.yml" to "0:0"
  246. set yaml value "config.kits.archer.armour.boots" from file "../../BlockWars/kits.yml" to "0:0"
  247. set yaml value "config.kits.archer.items.1 blaze rod of knockback 2" from file "../../BlockWars/kits.yml" to ""
  248. set yaml value "config.kits.archer.items.1 270:0" from file "../../BlockWars/kits.yml" to ""
  249. set yaml value "config.kits.archer.items.1 261:0" from file "../../BlockWars/kits.yml" to ""
  250. set yaml value "config.kits.archer.items.20 262:0" from file "../../BlockWars/kits.yml" to ""
  251. set yaml value "config.kits.runner.name" from file "../../BlockWars/kits.yml" to "Runner"
  252. 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"
  253. set yaml value "config.kits.runner.icon" from file "../../BlockWars/kits.yml" to "1 373:8194"
  254. set yaml value "config.kits.runner.purchase" from file "../../BlockWars/kits.yml" to "false"
  255. set yaml value "config.kits.runner.price" from file "../../BlockWars/kits.yml" to "0"
  256. set yaml value "config.kits.runner.armour.helmet" from file "../../BlockWars/kits.yml" to "0:0"
  257. set yaml value "config.kits.runner.armour.chestplate" from file "../../BlockWars/kits.yml" to "299:0"
  258. set yaml value "config.kits.runner.armour.leggings" from file "../../BlockWars/kits.yml" to "300:0"
  259. set yaml value "config.kits.runner.armour.boots" from file "../../BlockWars/kits.yml" to "0:0"
  260. set yaml value "config.kits.runner.items.1 268:0" from file "../../BlockWars/kits.yml" to ""
  261. set yaml value "config.kits.runner.items.1 270:0" from file "../../BlockWars/kits.yml" to ""
  262. set yaml value "config.kits.runner.items.1 373:8194" from file "../../BlockWars/kits.yml" to ""
  263. set yaml value "config.kits.miner.name" from file "../../BlockWars/kits.yml" to "Miner"
  264. 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)"
  265. set yaml value "config.kits.miner.icon" from file "../../BlockWars/kits.yml" to "1 274:0"
  266. set yaml value "config.kits.miner.purchase" from file "../../BlockWars/kits.yml" to "true"
  267. set yaml value "config.kits.miner.price" from file "../../BlockWars/kits.yml" to "200"
  268. set yaml value "config.kits.miner.armour.helmet" from file "../../BlockWars/kits.yml" to "301:0"
  269. set yaml value "config.kits.miner.armour.chestplate" from file "../../BlockWars/kits.yml" to "299:0"
  270. set yaml value "config.kits.miner.armour.leggings" from file "../../BlockWars/kits.yml" to "300:0"
  271. set yaml value "config.kits.miner.armour.boots" from file "../../BlockWars/kits.yml" to "298:0"
  272. set yaml value "config.kits.miner.items.1 268:0" from file "../../BlockWars/kits.yml" to ""
  273. set yaml value "config.kits.miner.items.1 274:0" from file "../../BlockWars/kits.yml" to ""
  274. set yaml value "config.kits.miner.items.1 261:0" from file "../../BlockWars/kits.yml" to ""
  275. set yaml value "config.kits.miner.items.3 262:0" from file "../../BlockWars/kits.yml" to ""
  276. set yaml value "config.kits.tank.name" from file "../../BlockWars/kits.yml" to "Tank"
  277. 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"
  278. set yaml value "config.kits.tank.icon" from file "../../BlockWars/kits.yml" to "1 307:0"
  279. set yaml value "config.kits.tank.purchase" from file "../../BlockWars/kits.yml" to "true"
  280. set yaml value "config.kits.tank.price" from file "../../BlockWars/kits.yml" to "600"
  281. set yaml value "config.kits.tank.armour.helmet" from file "../../BlockWars/kits.yml" to "0:0"
  282. set yaml value "config.kits.tank.armour.chestplate" from file "../../BlockWars/kits.yml" to "307:0"
  283. set yaml value "config.kits.tank.armour.leggings" from file "../../BlockWars/kits.yml" to "308:0"
  284. set yaml value "config.kits.tank.armour.boots" from file "../../BlockWars/kits.yml" to "0:0"
  285. set yaml value "config.kits.tank.items.1 270:0" from file "../../BlockWars/kits.yml" to ""
  286. set yaml value "config.kits.tank.items.1 261:0" from file "../../BlockWars/kits.yml" to ""
  287. set yaml value "config.kits.tank.items.2 262:0" from file "../../BlockWars/kits.yml" to ""
  288. set yaml value "config.kits.builder.name" from file "../../BlockWars/kits.yml" to "Builder"
  289. 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"
  290. set yaml value "config.kits.builder.icon" from file "../../BlockWars/kits.yml" to "1 159:4"
  291. set yaml value "config.kits.builder.purchase" from file "../../BlockWars/kits.yml" to "true"
  292. set yaml value "config.kits.builder.price" from file "../../BlockWars/kits.yml" to "350"
  293. set yaml value "config.kits.builder.armour.helmet" from file "../../BlockWars/kits.yml" to "0:0"
  294. set yaml value "config.kits.builder.armour.chestplate" from file "../../BlockWars/kits.yml" to "299:0"
  295. set yaml value "config.kits.builder.armour.leggings" from file "../../BlockWars/kits.yml" to "0:0"
  296. set yaml value "config.kits.builder.armour.boots" from file "../../BlockWars/kits.yml" to "0:0"
  297. set yaml value "config.kits.builder.items.1 268:0" from file "../../BlockWars/kits.yml" to ""
  298. set yaml value "config.kits.builder.items.1 270:0" from file "../../BlockWars/kits.yml" to ""
  299. set yaml value "config.kits.builder.items.1 261:0" from file "../../BlockWars/kits.yml" to ""
  300. set yaml value "config.kits.builder.items.3 262:0" from file "../../BlockWars/kits.yml" to ""
  301. set yaml value "config.kits.builder.items.5 159:4" from file "../../BlockWars/kits.yml" to ""
  302. set yaml value "config.kits.jumper.name" from file "../../BlockWars/kits.yml" to "Jumper"
  303. 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"
  304. set yaml value "config.kits.jumper.icon" from file "../../BlockWars/kits.yml" to "1 301:0"
  305. set yaml value "config.kits.jumper.purchase" from file "../../BlockWars/kits.yml" to "true"
  306. set yaml value "config.kits.jumper.price" from file "../../BlockWars/kits.yml" to "600"
  307. set yaml value "config.kits.jumper.armour.helmet" from file "../../BlockWars/kits.yml" to "298:0"
  308. set yaml value "config.kits.jumper.armour.chestplate" from file "../../BlockWars/kits.yml" to "299:0"
  309. set yaml value "config.kits.jumper.armour.leggings" from file "../../BlockWars/kits.yml" to "300:0"
  310. set yaml value "config.kits.jumper.armour.boots" from file "../../BlockWars/kits.yml" to "301:0"
  311. set yaml value "config.kits.jumper.items.1 268:0" from file "../../BlockWars/kits.yml" to ""
  312. set yaml value "config.kits.jumper.items.1 261:0" from file "../../BlockWars/kits.yml" to ""
  313. set yaml value "config.kits.jumper.items.1 262:0" from file "../../BlockWars/kits.yml" to ""
  314. set yaml value "config.kits.jumper.items.1 373:8235" from file "../../BlockWars/kits.yml" to ""
  315.  
  316. on load:
  317. if existence of "plugins/BlockWars/rewards.yml" is false:
  318. create file "plugins/BlockWars/rewards.yml"
  319. set yaml value "config.rewards.win.money.enable" from file "../../BlockWars/rewards.yml" to "true"
  320. set yaml value "config.rewards.win.money.amount" from file "../../BlockWars/rewards.yml" to "15"
  321. set yaml value "config.rewards.win.command.enable" from file "../../BlockWars/rewards.yml" to "false"
  322. set yaml value "config.rewards.win.command.cmd" from file "../../BlockWars/rewards.yml" to "give <player> diamond 5"
  323. set yaml value "config.rewards.win.message.enable" from file "../../BlockWars/rewards.yml" to "true"
  324. set yaml value "config.rewards.win.message.msg" from file "../../BlockWars/rewards.yml" to "&6+15 points"
  325. set yaml value "config.rewards.capture.money.enable" from file "../../BlockWars/rewards.yml" to "true"
  326. set yaml value "config.rewards.capture.money.amount" from file "../../BlockWars/rewards.yml" to "10"
  327. set yaml value "config.rewards.capture.command.enable" from file "../../BlockWars/rewards.yml" to "false"
  328. set yaml value "config.rewards.capture.command.cmd" from file "../../BlockWars/rewards.yml" to ""
  329. set yaml value "config.rewards.capture.message.enable" from file "../../BlockWars/rewards.yml" to "true"
  330. set yaml value "config.rewards.capture.message.msg" from file "../../BlockWars/rewards.yml" to "&6+10 points"
  331. set yaml value "config.rewards.dropped.money.enable" from file "../../BlockWars/rewards.yml" to "true"
  332. set yaml value "config.rewards.dropped.money.amount" from file "../../BlockWars/rewards.yml" to "5"
  333. set yaml value "config.rewards.dropped.command.enable" from file "../../BlockWars/rewards.yml" to "false"
  334. set yaml value "config.rewards.dropped.command.cmd" from file "../../BlockWars/rewards.yml" to ""
  335. set yaml value "config.rewards.dropped.message.enable" from file "../../BlockWars/rewards.yml" to "true"
  336. set yaml value "config.rewards.dropped.message.msg" from file "../../BlockWars/rewards.yml" to "&6+5 points"
  337. set yaml value "config.rewards.kill.money.enable" from file "../../BlockWars/rewards.yml" to "true"
  338. set yaml value "config.rewards.kill.money.amount" from file "../../BlockWars/rewards.yml" to "5"
  339. set yaml value "config.rewards.kill.command.enable" from file "../../BlockWars/rewards.yml" to "false"
  340. set yaml value "config.rewards.kill.command.cmd" from file "../../BlockWars/rewards.yml" to ""
  341. set yaml value "config.rewards.kill.message.enable" from file "../../BlockWars/rewards.yml" to "true"
  342. set yaml value "config.rewards.kill.message.msg" from file "../../BlockWars/rewards.yml" to "&6+5 points"
  343. set yaml value "config.rewards.participation.money.enable" from file "../../BlockWars/rewards.yml" to "true"
  344. set yaml value "config.rewards.participation.money.amount" from file "../../BlockWars/rewards.yml" to "1"
  345. set yaml value "config.rewards.participation.command.enable" from file "../../BlockWars/rewards.yml" to "false"
  346. set yaml value "config.rewards.participation.command.cmd" from file "../../BlockWars/rewards.yml" to ""
  347. set yaml value "config.rewards.participation.message.enable" from file "../../BlockWars/rewards.yml" to "false"
  348. set yaml value "config.rewards.participation.message.msg" from file "../../BlockWars/rewards.yml" to "&6+1 point"
  349.  
  350. on load:
  351. if existence of "plugins/BlockWars/scoreboard.yml" is false:
  352. create file "plugins/BlockWars/scoreboard.yml"
  353. wf "## BlockWars MINIGAME - Scoreboard ##" to "plugins/BlockWars/scoreboard.yml"
  354. wf "## Lobby Variables: <arena> - <amount> - <max> - <empty> ##" to "plugins/BlockWars/scoreboard.yml"
  355. wf "## Ingame Variables: <arena> - <amount> - <max> - <phase> - <time> - <blue-flag-captured> - <red-flag-captured> - <empty> ##" to "plugins/BlockWars/scoreboard.yml"
  356. wf "## Maximum 40 characters per line ##" to "plugins/BlockWars/scoreboard.yml"
  357. set yaml value "scoreboard.lobby.title" from file "../../BlockWars/scoreboard.yml" to "&e&lBlockWars"
  358. add "&2Map" to yaml list "scoreboard.lobby.lines" from file "../../BlockWars/scoreboard.yml"
  359. add "&f<arena>" to yaml list "scoreboard.lobby.lines" from file "../../BlockWars/scoreboard.yml"
  360. add "<empty>" to yaml list "scoreboard.lobby.lines" from file "../../BlockWars/scoreboard.yml"
  361. add "&2Players" to yaml list "scoreboard.lobby.lines" from file "../../BlockWars/scoreboard.yml"
  362. add "&f<amount>/<max>" to yaml list "scoreboard.lobby.lines" from file "../../BlockWars/scoreboard.yml"
  363. add "<empty>" to yaml list "scoreboard.lobby.lines" from file "../../BlockWars/scoreboard.yml"
  364. add "&fwww.mc-server.com" to yaml list "scoreboard.lobby.lines" from file "../../BlockWars/scoreboard.yml"
  365. set yaml value "scoreboard.ingame.title" from file "../../BlockWars/scoreboard.yml" to "&e&lBlockWars"
  366. add "<phase>&7: <time>" to yaml list "scoreboard.ingame.lines" from file "../../BlockWars/scoreboard.yml"
  367. add "<empty>" to yaml list "scoreboard.ingame.lines" from file "../../BlockWars/scoreboard.yml"
  368. add "&9Blue&7: <blue-flag-captured> captures" to yaml list "scoreboard.ingame.lines" from file "../../BlockWars/scoreboard.yml"
  369. add "&cRed&7: <red-flag-captured> captures" to yaml list "scoreboard.ingame.lines" from file "../../BlockWars/scoreboard.yml"
  370. add "<empty>" to yaml list "scoreboard.ingame.lines" from file "../../BlockWars/scoreboard.yml"
  371. add "&fwww.mc-server.com" to yaml list "scoreboard.ingame.lines" from file "../../BlockWars/scoreboard.yml"
  372. set {bw.config::scoreboard-lobby::title} to yaml value "scoreboard.lobby.title" from file "../../BlockWars/scoreboard.yml"
  373. set {bw.config::scoreboard-lobby::lines::*} to yaml list "scoreboard.lobby.lines" from file "../../BlockWars/scoreboard.yml"
  374. set {bw.config::scoreboard-ingame::title} to yaml value "scoreboard.ingame.title" from file "../../BlockWars/scoreboard.yml"
  375. set {bw.config::scoreboard-ingame::lines::*} to yaml list "scoreboard.ingame.lines" from file "../../BlockWars/scoreboard.yml"
  376.  
  377. on load:
  378. if size of {bw.arena-list::*} > 0:
  379. wait 5 seconds
  380. loop {bw.arena-list::*}:
  381. if {bw.status.%loop-value%} is not "Waiting" or "NotReady":
  382. if {bw.arena.%loop-value%} is set:
  383. make console execute command "/blockwars stop %loop-value%"
  384.  
  385. command /blockwars [<text>] [<text>] [<integer>]:
  386. aliases: /bw
  387. trigger:
  388. 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":
  389. send "%{bw.config::prefix}% &cUnknown command. Use /bw ? for a list of commands!"
  390. if arg 1 is not set:
  391. make sender execute command "/bw ?"
  392. if arg 1 is "info":
  393. send "%{bw.config::prefix}% &fPlugin create by LuisGerdez. This version is v.{@VersionID}!"
  394. if arg 1 is "help" or "?":
  395. if sender is player:
  396. send "%{bw.config::prefix}% &fCommand List:"
  397. send "&2&lCommands for users"
  398. send "&f/blockwars shop - &2Open shop menu"
  399. send "&f/blockwars join <arena> - &2Join arena"
  400. send "&f/blockwars leave - &2Leave arena"
  401. send "&f/blockwars info - &2View information about the plugin"
  402. if player has permission "blockwars.admin":
  403. send "&2&lCommands for setup arena"
  404. send "&f/blockwars setmainlobby - &2Set main lobby"
  405. send "&f/blockwars sethologram - &2Set location of hologram of stats"
  406. send "&f/blockwars tool - &2Get selection tool"
  407. send "&f/blockwars create <arena> - &2Create arena"
  408. send "&f/blockwars delete <arena> - &2Delete arena"
  409. send "&f/blockwars setlobby <arena> - &2Set lobby for arena"
  410. send "&f/blockwars setminplayers <arena> <integer> - &2Set min players to start"
  411. send "&f/blockwars setplayerperteam <arena> <integer> - &2Set max players per team"
  412. send "&f/blockwars setwall <arena> - &2Set wall"
  413. send "&f/blockwars setspawn <arena> - &2Get objects to set spawn"
  414. send "&f/blockwars setblock <arena> - &2Get objects to set block"
  415. send "&f/blockwars save <arena> - &2Save arena"
  416. send "&2&lCommands for administrators"
  417. send "&f/blockwars list - &2List of all games"
  418. send "&f/blockwars check <arena> - &2See setting of the game"
  419. send "&f/blockwars edit <arena> - &2Edit arena"
  420. send "&f/blockwars stop <arena> - &2Stop arena"
  421. send "&f/blockwars reload - &2Reload all config file"
  422. send "&f/blockwars update - &2Check for updates"
  423. else if sender is console:
  424. send "&2&lCommands for console"
  425. send "&f/blockwars list - &2List of all games"
  426. send "&f/blockwars check <arena> - &2See setting of the game"
  427. send "&f/blockwars stop <arena> - &2Stop arena"
  428. send "&f/blockwars reload - &2Reload all config file"
  429. send "&f/blockwars update - &2Check for updates"
  430. if arg 1 is "update":
  431. if sender is player:
  432. if player has permission "blockwars.admin":
  433. if text from "http://pastebin.com/raw/7B4aA8fD" is not "{@VersionID}":
  434. send "%{bw.config::prefix}% &aNew version available!"
  435. else:
  436. send "%{bw.config::prefix}% &cNo version available!"
  437. else:
  438. send "&c%{bw.config-msg::error::no-permission}%"
  439. else if sender is console:
  440. if text from "http://pastebin.com/raw/7B4aA8fD" is not "{@VersionID}":
  441. send "%{bw.config::prefix}% &aNew version available!"
  442. else:
  443. send "%{bw.config::prefix}% &cNo version available!"
  444. if arg 1 is "reload":
  445. if sender is player:
  446. if player has permission "blockwars.admin":
  447. invoke "bw-files-reload" from player
  448. else:
  449. send "%{bw.config::prefix}% &c%{bw.config-msg::error::no-permission}%"
  450. else if sender is console:
  451. invoke "bw-files-reload" from console
  452. if arg 1 is "kits" or "shop":
  453. if sender is player:
  454. set {_kits::*} to yaml nodes "config.kits" from file "../../BlockWars/kits.yml"
  455. if {_kits::*} is set:
  456. set {_rows} to size of {_kits::*}/9
  457. if {_rows} < 1:
  458. set {_rows} to 1
  459. else if {_rows} > 6:
  460. set {_rows} to 6
  461. set {_slot} to 0
  462. open chest with {_rows} rows named "%{bw.config::shop::shop-title-gui}%" to player
  463. wait 1 tick
  464. loop {_kits::*}:
  465. set {_purchase} to yaml value "config.kits.%loop-value%.purchase" from file "../../BlockWars/kits.yml"
  466. if {_purchase} is "true":
  467. set {_name} to yaml value "config.kits.%loop-value%.name" from file "../../BlockWars/kits.yml"
  468. set {_lore} to yaml value "config.kits.%loop-value%.lore" from file "../../BlockWars/kits.yml"
  469. set {_price} to yaml value "config.kits.%loop-value%.price" from file "../../BlockWars/kits.yml"
  470. set {_lore} to "&6Price: &a%{_price}% points//%{_lore}%"
  471. replace all "//" with "||" in {_lore}
  472. if {bw.%player%.kits-purchased::%loop-value%} is not set:
  473. set {_name} to "&c%{_name}%"
  474. else:
  475. set {_name} to "&a%{_name}%"
  476. set {_icon} to yaml value "config.kits.%loop-value%.icon" from file "../../BlockWars/kits.yml"
  477. set {_icon} to {_icon} parsed as item
  478. 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%""]"
  479. evaluate {_gui}
  480. add 1 to {_slot}
  481. else if sender is console:
  482. send "%{bw.config::prefix}% &cThis command can only be executed by players!" to console
  483. if arg 1 is "setmainlobby":
  484. if sender is player:
  485. if player has permission "blockwars.admin":
  486. set {bw.mainlobby} to location of player
  487. send "%{bw.config::prefix}% &fYou have established the main lobby!"
  488. else:
  489. send "%{bw.config::prefix}% &c%{bw.config-msg::error::no-permission}%"
  490. else if sender is console:
  491. send "%{bw.config::prefix}% &cThis command can only be executed by players!" to console
  492. if arg 1 is "setholo" or "sethologram":
  493. if sender is player:
  494. if player has permission "blockwars.admin":
  495. set {bw.loc-holo} to location of player
  496. evaluate "create hologram ""&7%{bw.config::prefix}%;&aYou have established the location of hologram!"" at {bw.loc-holo} for 3 seconds"
  497. else:
  498. send "%{bw.config::prefix}% &c%{bw.config-msg::error::no-permission}%"
  499. else if sender is console:
  500. send "%{bw.config::prefix}% &cThis command can only be executed by players!" to console
  501. if arg 1 is "create":
  502. if sender is player:
  503. if player has permission "blockwars.admin":
  504. if arg 2 is set:
  505. if {bw.arena.%arg 2%} is not set:
  506. if {bw-setup.%player%.pos1} is set:
  507. if {bw-setup.%player%.pos2} is set:
  508. set {bw.arena.%arg 2%} to true
  509. add arg 2 to {bw.arena-list::*}
  510. set {bw.status.%arg 2%} to "NotReady"
  511. set {bw.amountplayers.%arg 2%} to 0
  512. set {bw.minplayers.%arg 2%} to {bw.config::config::default_min_players}
  513. set {bw.playerperteam.%arg 2%} to {bw.config::config::default_players_per_team}
  514. set {bw.countdown-started?.%arg 2%} to false
  515. set {bw.map-pos1.%arg 2%} to {bw-setup.%player%.pos1}
  516. set {bw.map-pos2.%arg 2%} to {bw-setup.%player%.pos2}
  517. wait 1 tick
  518. delete {bw-setup.%player%.pos1}
  519. delete {bw-setup.%player%.pos2}
  520. send "%{bw.config::prefix}% &fYou have created the game &2%arg 2% &fwith success!"
  521. else:
  522. send "%{bw.config::prefix}% &cYou have not set the position 2! Use /blockwars tool for get the tool"
  523. else:
  524. send "%{bw.config::prefix}% &cYou have not set the position 1! Use /blockwars tool for get the tool"
  525. else:
  526. send "%{bw.config::prefix}% &cThis arena already exists!"
  527. else:
  528. send "%{bw.config::prefix}% &cUse /blockwars create <arena>"
  529. else:
  530. send "%{bw.config::prefix}% &c%{bw.config-msg::error::no-permission}%"
  531. else if sender is console:
  532. send "%{bw.config::prefix}% &cThis command can only be executed by players!" to console
  533. if arg 1 is "delete":
  534. if sender is player:
  535. if player has permission "blockwars.admin":
  536. if arg 2 is set:
  537. if {bw.arena.%arg 2%} is set:
  538. delete {bw.arena.%arg 2%}
  539. remove arg 2 from {bw.arena-list::*}
  540. delete {bw.status.%arg 2%}
  541. delete {bw.amountplayers.%arg 2%}
  542. delete {bw.minplayers.%arg 2%}
  543. delete {bw.playerperteam.%arg 2%}
  544. delete {bw.map-pos1.%arg 2%}
  545. delete {bw.map-pos2.%arg 2%}
  546. delete {bw.lobby.%arg 2%}
  547. delete {bw.wall-pos1.%arg 2%}
  548. delete {bw.wall-pos2.%arg 2%}
  549. delete {bw.regen-blocks.%arg 2%::*}
  550. delete {bw.red-villager.%arg 2%::location}
  551. delete {bw.blue-villager.%arg 2%::location}
  552. delete {bw.blue-villager.%arg 2%::id}
  553. delete {bw.red-villager.%arg 2%::id}
  554. send "%{bw.config::prefix}% &fYou removed the game &2%arg 2% &fwith success!"
  555. else:
  556. send "%{bw.config::prefix}% &cThis game does not exist!"
  557. else:
  558. send "%{bw.config::prefix}% &cUse /blockwars delete <arena>"
  559. else:
  560. send "%{bw.config::prefix}% &c%{bw.config-msg::error::no-permission}%"
  561. else if sender is console:
  562. send "%{bw.config::prefix}% &cThis command can only be executed by players!" to console
  563. if arg 1 is "setlobby":
  564. if sender is player:
  565. if player has permission "blockwars.admin":
  566. if arg 2 is set:
  567. if {bw.arena.%arg 2%} is set:
  568. if {bw.status.%arg 2%} is "NotReady":
  569. set {bw.lobby.%arg 2%} to location of player
  570. send "%{bw.config::prefix}% &fThe lobby waiting of game &2%arg 2% &fbeen established successfully!"
  571. else:
  572. send "%{bw.config::prefix}% &cThis game is already saved, use /bw edit %arg 2% to do this."
  573. else:
  574. send "%{bw.config::prefix}% &cThis game does not exist!"
  575. else:
  576. send "%{bw.config::prefix}% &cUse /blockwars setlobby <arena>"
  577. else:
  578. send "%{bw.config::prefix}% &c%{bw.config-msg::error::no-permission}%"
  579. else if sender is console:
  580. send "%{bw.config::prefix}% &cThis command can only be executed by players!" to console
  581. if arg 1 is "setminplayers":
  582. if sender is player:
  583. if player has permission "blockwars.admin":
  584. if {bw.arena.%arg 2%} is set:
  585. if {bw.status.%arg 2%} is "NotReady":
  586. if integer arg 1 is set:
  587. if integer arg 1 > 1:
  588. set {bw.minplayers.%arg 2%} to integer arg 1
  589. send "%{bw.config::prefix}% &fYou set the min players in the game to &2%integer arg 1% &fplayers!"
  590. else:
  591. send "&7%{bw.config::prefix}% &cThe min number of players must be greater than 1!"
  592. else:
  593. send "&7%{bw.config::prefix}% &cUse /bw setminplayers %arg 2% <integer>"
  594. else:
  595. send "&7%{bw.config::prefix}% &cThis game is already saved, use /bw edit %arg 2% to do this."
  596. else:
  597. send "&7%{bw.config::prefix}% &cThis game does not exist!"
  598. else:
  599. send "%{bw.config::prefix}% &c%{bw.config-msg::no-permission}%"
  600. else if sender is console:
  601. send "&7%{bw.config::prefix}% &cThis command can only be executed by players!" to console
  602. if arg 1 is "setplayerperteam" or "setplayersperteam":
  603. if sender is player:
  604. if player has permission "blockwars.admin":
  605. if arg 2 is set:
  606. if {bw.arena.%arg 2%} is set:
  607. if {bw.status.%arg 2%} is "NotReady":
  608. if integer arg 1 is set:
  609. if integer arg 1 > 1:
  610. set {bw.playerperteam.%arg 2%} to integer arg 1
  611. send "%{bw.config::prefix}% &fYou set the maximum number of players per team of game &2%arg 2% &fto &2%integer arg 1%&f!"
  612. else:
  613. send "&7%{bw.config::prefix}% &cThe min number of players must be greater than 1!"
  614. else:
  615. send "%{bw.config::prefix}% &cUse /blockwars setplayerperteam <arena> <number>"
  616. else:
  617. send "%{bw.config::prefix}% &cThis game is already saved, use /bw edit %arg 2% to do this."
  618. else:
  619. send "%{bw.config::prefix}% &cThis game does not exist!"
  620. else:
  621. send "%{bw.config::prefix}% &cUse /blockwars setplayerperteam <arena> <number>"
  622. else:
  623. send "%{bw.config::prefix}% &c%{bw.config-msg::error::no-permission}%"
  624. else if sender is console:
  625. send "%{bw.config::prefix}% &cThis command can only be executed by players!" to console
  626. if arg 1 is "tool":
  627. if sender is player:
  628. if player has permission "blockwars.admin":
  629. give a arrow named "&a&lBlockWars Tool" to player
  630. send "%{bw.config::prefix}% &fYou received the selection tool!"
  631. else:
  632. send "%{bw.config::prefix}% &c%{bw.config-msg::error::no-permission}%"
  633. else if sender is console:
  634. send "%{bw.config::prefix}% &cThis command can only be executed by players!" to console
  635. if arg 1 is "setwall" or "setwalls":
  636. if sender is player:
  637. if player has permission "blockwars.admin":
  638. if arg 2 is set:
  639. if {bw.arena.%arg 2%} is set:
  640. if {bw-setup.%player%.pos1} is set:
  641. if {bw-setup.%player%.pos2} is set:
  642. if {bw.status.%arg 2%} is "NotReady":
  643. set {bw.wall-pos1.%arg 2%} to {bw-setup.%player%.pos1}
  644. set {bw.wall-pos2.%arg 2%} to {bw-setup.%player%.pos2}
  645. wait 1 tick
  646. delete {bw-setup.%player%.pos1}
  647. delete {bw-setup.%player%.pos2}
  648. send "%{bw.config::prefix}% &fWall of game &2%arg 2% &fbeen established successfully!"
  649. else:
  650. send "%{bw.config::prefix}% &cThis game is already saved, use /bw edit %arg 2% to do this."
  651. else:
  652. send "%{bw.config::prefix}% &cYou have not set the position 2! Use /blockwars tool for get the tool"
  653. else:
  654. send "%{bw.config::prefix}% &cYou have not set the position 1! Use /blockwars tool for get the tool"
  655. else:
  656. send "%{bw.config::prefix}% &cThis game does not exist!"
  657. else:
  658. send "%{bw.config::prefix}% &cUse /blockwars setwall <arena>"
  659. else:
  660. send "%{bw.config::prefix}% &c%{bw.config-msg::error::no-permission}%"
  661. else if sender is console:
  662. send "%{bw.config::prefix}% &cThis command can only be executed by players!" to console
  663. if arg 1 is "setspawn":
  664. if sender is player:
  665. if player has permission "blockwars.admin":
  666. if arg 2 is set:
  667. if {bw.arena.%arg 2%} is set:
  668. if {bw.status.%arg 2%} is "NotReady":
  669. clear player's inventory
  670. give red wool named "&4Set Red Spawn" with lore "&7%arg 2%" to player
  671. give blue wool named "&9Set Blue Spawn" with lore "&7%arg 2%" to player
  672. send "%{bw.config::prefix}% &fUse items to set the spawn of the game &2%arg 2%&f!"
  673. else:
  674. send "%{bw.config::prefix}% &cThis game is already saved, use /bw edit %arg 2% to do this."
  675. else:
  676. send "%{bw.config::prefix}% &cThis game does not exist!"
  677. else:
  678. send "%{bw.config::prefix}% &cUse /blockwars setspawn <arena>"
  679. else:
  680. send "%{bw.config::prefix}% &c%{bw.config-msg::error::no-permission}%"
  681. else if sender is console:
  682. send "%{bw.config::prefix}% &cThis command can only be executed by players!" to console
  683. if arg 1 is "setblock":
  684. if sender is player:
  685. if player has permission "blockwars.admin":
  686. if arg 2 is set:
  687. if {bw.arena.%arg 2%} is set:
  688. if {bw.status.%arg 2%} is "NotReady":
  689. clear player's inventory
  690. give red wool named "&4Set Red Block" with lore "&7%arg 2%" to player
  691. give blue wool named "&9Set Blue Block" with lore "&7%arg 2%" to player
  692. send "%{bw.config::prefix}% &fUse items to set the flags of each team of the game &2%arg 2%&f!"
  693. else:
  694. send "%{bw.config::prefix}% &cThis game is already saved, use /bw edit %arg 2% to do this."
  695. else:
  696. send "%{bw.config::prefix}% &cThis game does not exist!"
  697. else:
  698. send "%{bw.config::prefix}% &cUse /blockwars setblock <arena>"
  699. else:
  700. send "%{bw.config::prefix}% &c%{bw.config-msg::error::no-permission}%"
  701. else if sender is console:
  702. send "%{bw.config::prefix}% &cThis command can only be executed by players!" to console
  703. if arg 1 is "setvillager":
  704. if sender is player:
  705. if player has permission "blockwars.admin":
  706. if arg 2 is set:
  707. if {bw.arena.%arg 2%} is set:
  708. if {bw.status.%arg 2%} is "NotReady":
  709. clear player's inventory
  710. give red wool named "&4Set Red Villager" with lore "&7%arg 2%" to player
  711. give blue wool named "&9Set Blue Villager" with lore "&7%arg 2%" to player
  712. send "%{bw.config::prefix}% &fUse items to set spawn of villager to select kits of the game &2%arg 2%&f!"
  713. else:
  714. send "%{bw.config::prefix}% &cThis game is already saved, use /bw edit %arg 2% to do this."
  715. else:
  716. send "%{bw.config::prefix}% &cThis game does not exist!"
  717. else:
  718. send "%{bw.config::prefix}% &cUse /blockwars setblock <arena>"
  719. else:
  720. send "%{bw.config::prefix}% &c%{bw.config-msg::error::no-permission}%"
  721. else if sender is console:
  722. send "%{bw.config::prefix}% &cThis command can only be executed by players!" to console
  723. if arg 1 is "check":
  724. if sender is player:
  725. if player has permission "blockwars.admin":
  726. if arg 2 is set:
  727. if {bw.arena.%arg 2%} is set:
  728. send "&a&l BLOCK WARS - Arena Check"
  729. send "&e> &f&l&nSetup Info:"
  730. if {bw.status.%arg 2%} is set:
  731. send "&e> &f&lStatus: &f%{bw.status.%arg 2%}%"
  732. else:
  733. send "&e> &f&lStatus: &8No set"
  734. if {bw.lobby.%arg 2%} is set:
  735. send "&e> &f&lLoc Lobby: &f%{bw.lobby.%arg 2%}%"
  736. else:
  737. send "&e> &f&lLoc Lobby: &8No set"
  738. if {bw.bluespawn.%arg 2%} is set:
  739. send "&e> &9&lBlue &f&lSpawn: &f%{bw.bluespawn.%arg 2%}%"
  740. else:
  741. send "&e> &9&lBlue &f&lSpawn: &8No set"
  742. if {bw.redspawn.%arg 2%} is set:
  743. send "&e> &4&lRed &f&lSpawn: &f%{bw.redspawn.%arg 2%}%"
  744. else:
  745. send "&e> &4&lRed &f&lSpawn: &8No set"
  746. if {bw.blueblock.%arg 2%} is set:
  747. send "&e> &9&lBlue &f&lFlag: &f%{bw.blueblock.%arg 2%}%"
  748. else:
  749. send "&e> &9&lBlue &f&lFlag: &8No set"
  750. if {bw.redblock.%arg 2%} is set:
  751. send "&e> &4&lRed &f&lFlag: &f%{bw.redblock.%arg 2%}%"
  752. else:
  753. send "&e> &4&lRed &f&lFlag: &8No set"
  754. if {bw.blue-villager.%arg 2%::location} is set:
  755. send "&e> &9&lBlue &f&lVillager Location: &f%{bw.blue-villager.%arg 2%::location}%"
  756. else:
  757. send "&e> &9&lBlue &f&lVillager Location: &8No set"
  758. if {bw.red-villager.%arg 2%::location} is set:
  759. send "&e> &4&lRed &f&lVillager Location: &f%{bw.red-villager.%arg 2%::location}%"
  760. else:
  761. send "&e> &4&lRed &f&lVillager Location: &8No set"
  762. if {bw.blue-villager.%arg 2%::id} is set:
  763. send "&e> &9&lBlue &f&lVillager Citizens ID: &f%{bw.blue-villager.%arg 2%::id}%"
  764. else:
  765. send "&e> &9&lBlue &f&lVillager Citizens ID: &8No set"
  766. if {bw.red-villager.%arg 2%::id} is set:
  767. send "&e> &4&lRed &f&lVillager Citizens ID: &f%{bw.red-villager.%arg 2%::id}%"
  768. else:
  769. send "&e> &4&lRed &f&lVillager Citizens ID: &8No set"
  770. send "&e> &f&l&nGame Info:"
  771. if {bw.phase.%arg 2%} is set:
  772. send "&e> &f&lPhase: &f%{bw.phase.%arg 2%}%"
  773. else:
  774. send "&e> &f&lPhase: &8No Definite"
  775. send "&e> &f&lPlayers Total Mount: &f%{bw.amountplayers.%arg 2%}%"
  776. send "&e> &f&lPlaying Players:"
  777. if size of {bw.players.%arg 2%::*} > 0:
  778. loop {bw.players.%arg 2%::*}:
  779. send " %loop-value%"
  780. else:
  781. send " &8No Players"
  782. send "&e> &f&l&nTeam Info:"
  783. if size of {bw.red-team.%arg 2%::*} > 0:
  784. send "&e> &4Red Players: &f%{bw.red-team.%arg 2%::*}%"
  785. else:
  786. send "&e> &4Red Players: &8No Players"
  787. if size of {bw.blue-team.%arg 2%::*} > 0:
  788. send "&e> &9Blue Players: &f%{bw.blue-team.%arg 2%::*}%"
  789. else:
  790. send "&e> &9Blue Players: &8No Players"
  791. else:
  792. send "&cThis game does not exist!"
  793. else:
  794. send "&cUse /blockwars check <arena>"
  795. else:
  796. send "&c%{bw.config-msg::error::no-permission}%"
  797. else if sender is console:
  798. if arg 2 is set:
  799. if {bw.arena.%arg 2%} is set:
  800. send "&a&l BLOCK WARS - Arena Check"
  801. send "&e> &f&l&nSetup Info:"
  802. if {bw.status.%arg 2%} is set:
  803. send "&e> &f&lStatus: &f%{bw.status.%arg 2%}%"
  804. else:
  805. send "&e> &f&lStatus: &8No set"
  806. if {bw.lobby.%arg 2%} is set:
  807. send "&e> &f&lLoc Lobby: &f%{bw.lobby.%arg 2%}%"
  808. else:
  809. send "&e> &f&lLoc Lobby: &8No set"
  810. if {bw.bluespawn.%arg 2%} is set:
  811. send "&e> &9&lBlue &f&lSpawn: &f%{bw.bluespawn.%arg 2%}%"
  812. else:
  813. send "&e> &9&lBlue &f&lSpawn: &8No set"
  814. if {bw.redspawn.%arg 2%} is set:
  815. send "&e> &4&lRed &f&lSpawn: &f%{bw.redspawn.%arg 2%}%"
  816. else:
  817. send "&e> &4&lRed &f&lSpawn: &8No set"
  818. if {bw.blueblock.%arg 2%} is set:
  819. send "&e> &9&lBlue &f&lFlag: &f%{bw.blueblock.%arg 2%}%"
  820. else:
  821. send "&e> &9&lBlue &f&lFlag: &8No set"
  822. if {bw.redblock.%arg 2%} is set:
  823. send "&e> &4&lRed &f&lFlag: &f%{bw.redblock.%arg 2%}%"
  824. else:
  825. send "&e> &4&lRed &f&lFlag: &8No set"
  826. if {bw.blue-villager.%arg 2%::location} is set:
  827. send "&e> &9&lBlue &f&lVillager Location: &f%{bw.blue-villager.%arg 2%::location}%"
  828. else:
  829. send "&e> &9&lBlue &f&lVillager Location: &8No set"
  830. if {bw.red-villager.%arg 2%::location} is set:
  831. send "&e> &4&lRed &f&lVillager Location: &f%{bw.red-villager.%arg 2%::location}%"
  832. else:
  833. send "&e> &4&lRed &f&lVillager Location: &8No set"
  834. if {bw.blue-villager.%arg 2%::id} is set:
  835. send "&e> &9&lBlue &f&lVillager Citizens ID: &f%{bw.blue-villager.%arg 2%::id}%"
  836. else:
  837. send "&e> &9&lBlue &f&lVillager Citizens ID: &8No set"
  838. if {bw.red-villager.%arg 2%::id} is set:
  839. send "&e> &4&lRed &f&lVillager Citizens ID: &f%{bw.red-villager.%arg 2%::id}%"
  840. else:
  841. send "&e> &4&lRed &f&lVillager Citizens ID: &8No set"
  842. send "&e> &f&l&nGame Info:"
  843. if {bw.phase.%arg 2%} is set:
  844. send "&e> &f&lPhase: &f%{bw.phase.%arg 2%}%"
  845. else:
  846. send "&e> &f&lPhase: &8No Definite"
  847. send "&e> &f&lPlayers Total Mount: &f%{bw.amountplayers.%arg 2%}%"
  848. send "&e> &f&lPlaying Players:"
  849. if size of {bw.players.%arg 2%::*} > 0:
  850. loop {bw.players.%arg 2%::*}:
  851. send " %loop-value%"
  852. else:
  853. send " &8No Players"
  854. send "&e> &f&l&nTeam Info:"
  855. if size of {bw.red-team.%arg 2%::*} > 0:
  856. send "&e> &4Red Players: &f%{bw.red-team.%arg 2%::*}%"
  857. else:
  858. send "&e> &4Red Players: &8No Players"
  859. if size of {bw.blue-team.%arg 2%::*} > 0:
  860. send "&e> &9Blue Players: &f%{bw.blue-team.%arg 2%::*}%"
  861. else:
  862. send "&e> &9Blue Players: &8No Players"
  863. else:
  864. send "&cThis game does not exist!"
  865. else:
  866. send "&cUse /blockwars check <arena>"
  867. if arg 1 is "edit":
  868. if sender is player:
  869. if player has permission "blockwars.admin":
  870. if arg 2 is set:
  871. if {bw.arena.%arg 2%} is set:
  872. if {bw.status.%arg 2%} is "Waiting" or "Starting":
  873. loop {bw.players.%arg 2%::*}:
  874. make loop-value execute command "/blockwars leave"
  875. send "%{bw.config::prefix}% &cThe game has been stopped!" to loop-value
  876. send "%{bw.config::prefix}% &fYou have activated edit mode of the game &2%arg 2% &fsuccessfully!"
  877. set {bw.status.%arg 2%} to "NotReady"
  878. else if {bw.status.%arg 2%} is "NotReady":
  879. send "%{bw.config::prefix}% &cEdit mode of this game is already activated!"
  880. else if {bw.status.%arg 2%} is "Rebuild":
  881. send "%{bw.config::prefix}% &cThis map is regenerating. You can not do this!"
  882. else if {bw.status.%arg 2%} is "Ingame":
  883. send "%{bw.config::prefix}% &cThis game is in progress!. Use /bw stop %arg 2% to stop."
  884. else:
  885. send "%{bw.config::prefix}% &cThis game does not exist!"
  886. else:
  887. send "%{bw.config::prefix}% &cUse /blockwars edit <arena>"
  888. else:
  889. send "%{bw.config::prefix}% &c%{bw.config-msg::error::no-permission}%"
  890. else if sender is console:
  891. send "%{bw.config::prefix}% &cThis command can only be executed by players!" to console
  892. if arg 1 is "save":
  893. if sender is player:
  894. if player has permission "blockwars.admin":
  895. if arg 2 is set:
  896. if {bw.arena.%arg 2%} is set:
  897. if {bw.status.%arg 2%} is "NotReady":
  898. if {bw.lobby.%arg 2%} is set:
  899. if {bw.wall-pos1.%arg 2%} is set:
  900. if {bw.wall-pos2.%arg 2%} is set:
  901. if {bw.bluespawn.%arg 2%} is set:
  902. if {bw.redspawn.%arg 2%} is set:
  903. if {bw.blueblock.%arg 2%} is set:
  904. if {bw.redblock.%arg 2%} is set:
  905. if {bw.blue-villager.%arg 2%::location} is set:
  906. if {bw.red-villager.%arg 2%::location} is set:
  907. send "%{bw.config::prefix}% &2&lMap blocks are to be stored below. You can look progress at action bar."
  908. set {_lag} to 0
  909. set {total} to 0
  910. wait 10 ticks
  911. loop blocks within {bw.map-pos1.%arg 2%} to {bw.map-pos2.%arg 2%}:
  912. if loop-block is not air:
  913. add 1 to {total}
  914. loop blocks within {bw.map-pos1.%arg 2%} to {bw.map-pos2.%arg 2%}:
  915. if loop-block is not air:
  916. set {bw.regen-blocks.%arg 2%::%location of loop-block%} to type of block at loop-block
  917. add 1 to {_blocks}
  918. add 1 to {_lag}
  919. set action bar of player to "&2Saving Blocks... (&8%{_blocks}%/%{total}%&2)"
  920. if {_lag} = 500:
  921. set {_lag} to 0
  922. wait 2 seconds
  923. set {bw.status.%arg 2%} to "Waiting"
  924. send "%{bw.config::prefix}% &fYou have saved the game &2%arg 2% &fsuccessfully!"
  925. else:
  926. send "%{bw.config::prefix}% &cYou have not set the villager. Use /blockwars check %arg 2% to check!"
  927. else:
  928. send "%{bw.config::prefix}% &cYou have not set the villager. Use /blockwars check %arg 2% to check!"
  929. else:
  930. send "%{bw.config::prefix}% &cYou have not set the flag. Use /blockwars check %arg 2% to check!"
  931. else:
  932. send "%{bw.config::prefix}% &cYou have not set the flag. Use /blockwars check %arg 2% to check!"
  933. else:
  934. send "%{bw.config::prefix}% &cYou have not set the spawn. Use /blockwars check %arg 2% to check!"
  935. else:
  936. send "%{bw.config::prefix}% &cYou have not set the spawn. Use /blockwars check %arg 2% to check!"
  937. else:
  938. send "%{bw.config::prefix}% &cYou have not set the wall. Use /blockwars check %arg 2% to check!"
  939. else:
  940. send "%{bw.config::prefix}% &cYou have not set the wall. Use /blockwars check %arg 2% to check!"
  941. else:
  942. send "%{bw.config::prefix}% &cYou have not established the lobby waiting. Use /blockwars check %arg 2% to check!"
  943. else:
  944. send "%{bw.config::prefix}% &cThis game is already saved, use /bw edit %arg 2% to do this."
  945. else:
  946. send "%{bw.config::prefix}% &cThis game does not exist!"
  947. else:
  948. send "%{bw.config::prefix}% &cUse /blockwars save <arena>"
  949. else:
  950. send "%{bw.config::prefix}% &c%{bw.config-msg::error::no-permission}%"
  951. else if sender is console:
  952. send "%{bw.config::prefix}% &cThis command can only be executed by players!" to console
  953. if arg 1 is "stop":
  954. if sender is player:
  955. if player has permission "blockwars.admin":
  956. if arg 2 is set:
  957. if {bw.arena.%arg 2%} is set:
  958. if {bw.status.%arg 2%} is not "NotReady":
  959. loop {bw.players.%arg 2%::*}:
  960. make loop-value execute command "/blockwars leave"
  961. send "&c%{bw.config-msg::error::stop-arena}%" to loop-value
  962. set {bw.status.%arg 2%} to "Rebuild"
  963. clear {bw.players.%arg 2%::*}
  964. clear {bw.blue-team.%arg 2%::*}
  965. clear {bw.red-team.%arg 2%::*}
  966. set {bw.amountplayers.%arg 2%} to 0
  967. set {_lag} to 0
  968. loop blocks within {bw.map-pos1.%arg 2%} to {bw.map-pos2.%arg 2%}:
  969. if {_lag} > 100:
  970. chance of 50%:
  971. wait {bw.config::rebuild-map-delay}
  972. else:
  973. wait 1.5 seconds
  974. set {_lag} to 0
  975. if {bw.regen-blocks.%arg 2%::%location of loop-block%} is not set:
  976. if loop-block is not air:
  977. add 1 to {_lag}
  978. set loop-block to air
  979. else:
  980. if type of loop-block is not {bw.regen-blocks.%arg 2%::%location of loop-block%}:
  981. add 1 to {_lag}
  982. set block at loop-block to {bw.regen-blocks.%arg 2%::%location of loop-block%}
  983. set {bw.status.%arg 2%} to "Waiting"
  984. set {bw.countdown-started?.%arg 2%} to false
  985. send "%{bw.config::prefix}% &fYou have stopped arena &2%arg 2% &fwith success!"
  986. else:
  987. send "%{bw.config::prefix}% &cThis game is not ready!"
  988. else:
  989. send "%{bw.config::prefix}% &cThis game does not exist!"
  990. else:
  991. send "%{bw.config::prefix}% &cUse /blockwars stop <arena>"
  992. else:
  993. send "%{bw.config::prefix}% &c%{bw.config-msg::error::no-permission}%"
  994. else if sender is console:
  995. if arg 2 is set:
  996. if {bw.arena.%arg 2%} is set:
  997. if {bw.status.%arg 2%} is not "NotReady":
  998. loop {bw.players.%arg 2%::*}:
  999. make loop-value execute command "/blockwars leave"
  1000. set {bw.status.%arg 2%} to "Rebuild"
  1001. clear {bw.players.%arg 2%::*}
  1002. clear {bw.blue-team.%arg 2%::*}
  1003. clear {bw.red-team.%arg 2%::*}
  1004. set {bw.amountplayers.%arg 2%} to 0
  1005. set {_lag} to 0
  1006. loop blocks within {bw.map-pos1.%arg 2%} to {bw.map-pos2.%arg 2%}:
  1007. if {_lag} > 100:
  1008. chance of 50%:
  1009. wait {bw.config::rebuild-map-delay}
  1010. else:
  1011. wait 1.5 seconds
  1012. set {_lag} to 0
  1013. if {bw.regen-blocks.%arg 2%::%location of loop-block%} is not set:
  1014. if loop-block is not air:
  1015. add 1 to {_lag}
  1016. set loop-block to air
  1017. else:
  1018. if type of loop-block is not {bw.regen-blocks.%arg 2%::%location of loop-block%}:
  1019. add 1 to {_lag}
  1020. set block at loop-block to {bw.regen-blocks.%arg 2%::%location of loop-block%}
  1021. set {bw.status.%arg 2%} to "Waiting"
  1022. set {bw.countdown-started?.%arg 2%} to false
  1023. send "&8You have stopped arena %arg 2% with success!" to console
  1024. else:
  1025. send "%{bw.config::prefix}% &cThis game is not ready!" to console
  1026. else:
  1027. send "%{bw.config::prefix}% &cThis game does not exist!" to console
  1028. else:
  1029. send "%{bw.config::prefix}% &cUse /blockwars stop <arena>" to console
  1030. if arg 1 is "list":
  1031. if sender is player:
  1032. if player has permission "blockwars.admin":
  1033. if size of {bw.arena-list::*} > 0:
  1034. send "&2&l Block Wars - Arena List"
  1035. loop {bw.arena-list::*}:
  1036. send " &e> &f&l%loop-value-1% &8- &f%{bw.status.%loop-value-1%}%"
  1037. else:
  1038. send "&7&l Block Wars - Arena List"
  1039. send "&7>> &8No games created!"
  1040. else:
  1041. send "&c%{bw.config-msg::error::no-permission}%"
  1042. else if sender is console:
  1043. if size of {bw.arena-list::*} > 0:
  1044. send "&2&l Block Wars - Arena List"
  1045. loop {bw.arena-list::*}:
  1046. send " &e> &f&l%loop-value-1% &8- &f%{bw.status.%loop-value-1%}%"
  1047. else:
  1048. send "&7&l Block Wars - Arena List"
  1049. send "&7>> &8No games created!"
  1050. if arg 1 is "join":
  1051. if sender is player:
  1052. if player has permission "blockwars.user":
  1053. if arg 2 is set:
  1054. if {bw.%player%.ingame} and {bw.%player%.lobby} is false:
  1055. if {bw.arena.%arg 2%} is true:
  1056. if {bw.status.%arg 2%} is "Waiting" or "Starting":
  1057. if {bw.amountplayers.%arg 2%} < {bw.playerperteam.%arg 2%}*2:
  1058. set {bw.%player%.playing-arena} to arg 2
  1059. set {bw.%player%.no-damage} to false
  1060. wipe player's sidebar
  1061. loop 37 times:
  1062. set {_id} to loop-number
  1063. remove 1 from {_id}
  1064. set {bw.%player%.inv::%{_id}%} to slot {_id} of player's inventory
  1065. set {bw.%player%.armor::helmet} to player's helmet
  1066. set {bw.%player%.armor::chestplate} to player's chestplate
  1067. set {bw.%player%.armor::leggings} to player's leggings
  1068. set {bw.%player%.armor::boots} to player's boots
  1069. wait 1 tick
  1070. clear player's inventory
  1071. set {_slot} to "%{bw.config::item::kit-item-slot}%" parsed as integer
  1072. if {_slot} is not set:
  1073. set {_slot} to 1
  1074. set {_id} to "%{bw.config::item::kit-item-id}%" parsed as item
  1075. if {_id} is not set:
  1076. set {_id} to paper
  1077. set {_name} to {bw.config::item::kit-item-name}
  1078. set {_accion} to "set slot {_slot} of player to {_id} named ""%{_name}%"""
  1079. evaluate {_accion}
  1080. set {_slot} to "%{bw.config::item::team-item-slot}%" parsed as integer
  1081. if {_slot} is not set:
  1082. set {_slot} to 0
  1083. set {_id} to "%{bw.config::item::team-item-id}%" parsed as item
  1084. if {_id} is not set:
  1085. set {_id} to nether star
  1086. set {_name} to {bw.config::item::team-item-name}
  1087. set {_accion} to "set slot {_slot} of player to {_id} named ""%{_name}%"""
  1088. evaluate {_accion}
  1089. set {_slot} to "%{bw.config::item::leave-item-slot}%" parsed as integer
  1090. if {_slot} is not set:
  1091. set {_slot} to 8
  1092. set {_id} to "%{bw.config::item::leave-item-id}%" parsed as item
  1093. if {_id} is not set:
  1094. set {_id} to redstone
  1095. set {_name} to {bw.config::item::leave-item-name}
  1096. set {_accion} to "set slot {_slot} of player to {_id} named ""%{_name}%"""
  1097. evaluate {_accion}
  1098. remove mining fatigue and speed and haste and regeneration and slowness from player
  1099. set hunger of player to 20
  1100. set gamemode of player to survival
  1101. heal the player
  1102. set {bw.%player%.lobby} to true
  1103. set {bw.%player%.ingame} to false
  1104. set {bw.%player%.bandera} to false
  1105. teleport player to {bw.lobby.%{bw.%player%.playing-arena}%}
  1106. delete {bw.%player%.team}
  1107. delete {bw.%player%.kit}
  1108. add player to {bw.players.%{bw.%player%.playing-arena}%::*}
  1109. loop {bw.players.%{bw.%player%.playing-arena}%::*}:
  1110. invoke "bw-lobbyscoreboard" from loop-value
  1111. set {bw.amountplayers.%{bw.%player%.playing-arena}%} to size of {bw.players.%{bw.%player%.playing-arena}%::*}
  1112. set {_msg-join} to {bw.config-msg::listener::join-broad}
  1113. set {_amount} to {bw.amountplayers.%{bw.%player%.playing-arena}%}
  1114. set {_max} to {bw.playerperteam.%{bw.%player%.playing-arena}%}*2
  1115. replace all "<player>" with "%player%" in {_msg-join}
  1116. replace all "<amount>" with "%{_amount}%" in {_msg-join}
  1117. replace all "<max>" with "%{_max}%" in {_msg-join}
  1118. send "&f%{_msg-join}%" to {bw.players.%{bw.%player%.playing-arena}%::*}
  1119. if {bw.amountplayers.%{bw.%player%.playing-arena}%} >= {bw.minplayers.%{bw.%player%.playing-arena}%}:
  1120. set {bw.status.%{bw.%player%.playing-arena}%} to "Starting"
  1121. if {bw.countdown-started?.%{bw.%player%.playing-arena}%} is false:
  1122. set {bw.countdown.%{bw.%player%.playing-arena}%} to {bw.config::config::countdown}
  1123. set {bw.countdown-started?.%{bw.%player%.playing-arena}%} to true
  1124. loop {bw.countdown.%{bw.%player%.playing-arena}%} times:
  1125. if size of {bw.players.%{bw.%player%.playing-arena}%::*} is more than or equal to {bw.minplayers.%{bw.%player%.playing-arena}%}:
  1126. if {bw.countdown.%{bw.%player%.playing-arena}%} <= 0:
  1127. stop loop
  1128. if {bw.countdown.%{bw.%player%.playing-arena}%} is less than or equal to 5:
  1129. set {_msg-countdown} to {bw.config-msg::game::countdown-msg}
  1130. set {_time} to {bw.countdown.%{bw.%player%.playing-arena}%}
  1131. replace all "<time>" with "%{_time}%" in {_msg-countdown}
  1132. send "&f%{_msg-countdown}%" to {bw.players.%{bw.%player%.playing-arena}%::*}
  1133. set level of {bw.players.%{bw.%player%.playing-arena}%::*} to {bw.countdown.%{bw.%player%.playing-arena}%}
  1134. play raw sound "random.pop" at {bw.players.%{bw.%player%.playing-arena}%::*} with pitch 1 volume 10
  1135. wait 1 seconds
  1136. remove 1 from {bw.countdown.%{bw.%player%.playing-arena}%}
  1137. else:
  1138. set {_msg-countdown} to {bw.config-msg::game::countdown-msg}
  1139. set {_time} to {bw.countdown.%{bw.%player%.playing-arena}%}
  1140. replace all "<time>" with "%{_time}%" in {_msg-countdown}
  1141. send "&f%{_msg-countdown}%" to {bw.players.%{bw.%player%.playing-arena}%::*}
  1142. set level of {bw.players.%{bw.%player%.playing-arena}%::*} to {bw.countdown.%{bw.%player%.playing-arena}%}
  1143. wait 1 seconds
  1144. remove 1 from {bw.countdown.%{bw.%player%.playing-arena}%}
  1145. else:
  1146. send "&c%{bw.config-msg::error::no-min-players}%" to {bw.players.%{bw.%player%.playing-arena}%::*}
  1147. set {bw.status.%{bw.%player%.playing-arena}%} to "Waiting"
  1148. set {bw.countdown-started?.%{bw.%player%.playing-arena}%} to false
  1149. set level of {bw.players.%{bw.%player%.playing-arena}%::*} to 0
  1150. set level progress of {bw.players.%{bw.%player%.playing-arena}%::*} to 0.0
  1151. wait 1 tick
  1152. stop
  1153. if {bw.countdown.%{bw.%player%.playing-arena}%} is less than or equal to 1:
  1154. set {bw.status.%{bw.%player%.playing-arena}%} to "Ingame"
  1155. set {bw.countdown.%{bw.%player%.playing-arena}%} to {bw.config::config::countdown}
  1156. set {bw.countdown-started?.%{bw.%player%.playing-arena}%} to false
  1157. loop {bw.players.%{bw.%player%.playing-arena}%::*}:
  1158. add 1 to {bw.stats.games-played::%loop-value%}
  1159. set {bw.%loop-value%.lobby} to false
  1160. set {bw.%loop-value%.ingame} to true
  1161. invoke "bw-give-rewards" from loop-value and "participation"
  1162. set {bw.redpoints.%{bw.%player%.playing-arena}%} to 0
  1163. set {bw.bluepoints.%{bw.%player%.playing-arena}%} to 0
  1164. set {_jugadores::*} to {bw.players.%{bw.%player%.playing-arena}%::*}
  1165. loop {bw.players.%{bw.%player%.playing-arena}%::*}:
  1166. set {_jugadores::%loop-value%} to loop-value
  1167. loop size of {_jugadores::*} times:
  1168. set {_player} to random element of {_jugadores::*}
  1169. remove {_player} from {_jugadores::*}
  1170. delete {_jugadores::%{_player}%}
  1171. if {bw.%{_player}%.team} is not set:
  1172. if size of {bw.red-team.%{bw.%player%.playing-arena}%::*} is less than {bw.playerperteam.%{bw.%player%.playing-arena}%}:
  1173. set {bw.%{_player}%.team} to "red"
  1174. add {_player} to {bw.red-team.%{bw.%player%.playing-arena}%::*}
  1175. send "&a%{bw.config-msg::game::jointeam-red}%" to {_player}
  1176. teleport {_player} to {bw.redspawn.%{bw.%player%.playing-arena}%}
  1177. clear {_player}'s inventory
  1178. give 64 red clay to {_player}
  1179. give 8 red clay to {_player}
  1180. give diamond pickaxe to {_player}
  1181. else if size of {bw.blue-team.%{bw.%player%.playing-arena}%::*} is less than {bw.playerperteam.%{bw.%player%.playing-arena}%}:
  1182. set {bw.%{_player}%.team} to "blue"
  1183. add {_player} to {bw.blue-team.%{bw.%player%.playing-arena}%::*}
  1184. send "&a%{bw.config-msg::game::jointeam-blue}%" to {_player}
  1185. teleport {_player} to {bw.bluespawn.%{bw.%player%.playing-arena}%}
  1186. clear {_player}'s inventory
  1187. give 64 blue clay to {_player}
  1188. give 8 blue clay to {_player}
  1189. give diamond pickaxe to {_player}
  1190. else:
  1191. if {bw.%{_player}%.team} is "red":
  1192. teleport {_player} to {bw.redspawn.%{bw.%player%.playing-arena}%}
  1193. clear {_player}'s inventory
  1194. give 64 red clay to {_player}
  1195. give 8 red clay to {_player}
  1196. give diamond pickaxe to {_player}
  1197. else if {bw.%{_player}%.team} is "blue":
  1198. teleport {_player} to {bw.bluespawn.%{bw.%player%.playing-arena}%}
  1199. clear {_player}'s inventory
  1200. give 64 blue clay to {_player}
  1201. give 8 blue clay to {_player}
  1202. give diamond pickaxe to {_player}
  1203. set level of {bw.players.%{bw.%player%.playing-arena}%::*} to 0
  1204. set level progress of {bw.players.%{bw.%player%.playing-arena}%::*} to 0.0
  1205. send "&6%{bw.config-msg::game::phasestart-build}%" to {bw.players.%{bw.%player%.playing-arena}%::*}
  1206. #make {bw.red-team.%{bw.%player%.playing-arena}%::*} see {bw.blue-team.%{bw.%player%.playing-arena}%::*}'s prefix as "&9"
  1207. #make {bw.blue-team.%{bw.%player%.playing-arena}%::*} see {bw.red-team.%{bw.%player%.playing-arena}%::*}'s prefix as "&c"
  1208. #loop {bw.red-team.%{bw.%player%.playing-arena}%::*}:
  1209. #make loop-value see {bw.red-team.%{bw.%player%.playing-arena}%::*}'s prefix as "&c"
  1210. #loop {bw.blue-team.%{bw.%player%.playing-arena}%::*}:
  1211. #make loop-value see {bw.blue-team.%{bw.%player%.playing-arena}%::*}'s prefix as "&9"
  1212. set {bw.phase.%{bw.%player%.playing-arena}%} to "build"
  1213. set {bw.time.%{bw.%player%.playing-arena}%} to 3 minutes
  1214. loop 180 times:
  1215. if {bw.status.%{bw.%player%.playing-arena}%} is "Ingame":
  1216. loop {bw.players.%{bw.%player%.playing-arena}%::*}:
  1217. set {_sb} to loop-value-2
  1218. invoke "bw-ingamescoreboard" from {_sb}
  1219. remove 1 seconds from {bw.time.%{bw.%player%.playing-arena}%}
  1220. wait 1 seconds
  1221. else:
  1222. stop trigger
  1223. set {bw.phase.%{bw.%player%.playing-arena}%} to "figth"
  1224. set {bw.time.%{bw.%player%.playing-arena}%} to 7 minutes
  1225. send "&6%{bw.config-msg::game::phasestart-figth}%" to {bw.players.%{bw.%player%.playing-arena}%::*}
  1226. loop blocks within {bw.wall-pos1.%{bw.%player%.playing-arena}%} to {bw.wall-pos2.%{bw.%player%.playing-arena}%}:
  1227. set loop-block to air
  1228. loop {bw.players.%{bw.%player%.playing-arena}%::*}:
  1229. set {_p} to loop-value
  1230. clear {_p}'s inventory
  1231. if {bw.config::config::regeneration-effect} is "true":
  1232. apply regeneration 1 to {_p} for 999 days
  1233. apply mining fatigue 1 to {_p} for 999 days
  1234. teleport {_p} to {bw.%{bw.%{_p}%.team}%spawn.%{bw.%player%.playing-arena}%}
  1235. invoke "bw-give-kits" from {_p} and {bw.%{_p}%.kit}
  1236. loop 420 times:
  1237. if {bw.status.%{bw.%player%.playing-arena}%} is "Ingame":
  1238. loop {bw.players.%{bw.%player%.playing-arena}%::*}:
  1239. set {_sb} to loop-value-2
  1240. invoke "bw-ingamescoreboard" from {_sb}
  1241. remove 1 seconds from {bw.time.%{bw.%player%.playing-arena}%}
  1242. wait 1 seconds
  1243. else:
  1244. stop trigger
  1245. if {bw.redpoints.%{bw.%player%.playing-arena}%} > {bw.bluepoints.%{bw.%player%.playing-arena}%}:
  1246. send "%{bw.config-msg::win::red-win}%" to {bw.players.%{bw.%player%.playing-arena}%::*}
  1247. loop {bw.red-team.%{bw.%player%.playing-arena}%::*}:
  1248. add 1 to {bw.stats.wins::%loop-value%}
  1249. invoke "bw-give-rewards" from loop-value and "win"
  1250. loop {bw.players.%{bw.%player%.playing-arena}%::*}:
  1251. invoke "bw-endgame" from loop-value
  1252. loop 20 times:
  1253. spawn firework at {bw.red-team.%{bw.%player%.playing-arena}%::*}
  1254. wait 8 ticks
  1255. else if {bw.bluepoints.%{bw.%player%.playing-arena}%} > {bw.redpoints.%{bw.%player%.playing-arena}%}:
  1256. send "%{bw.config-msg::win::blue-win}%" to {bw.players.%{bw.%player%.playing-arena}%::*}
  1257. loop {bw.blue-team.%{bw.%player%.playing-arena}%::*}:
  1258. add 1 to {bw.stats.wins::%loop-value%}
  1259. invoke "bw-give-rewards" from loop-value and "win"
  1260. loop {bw.players.%{bw.%player%.playing-arena}%::*}:
  1261. invoke "bw-endgame" from loop-value
  1262. loop 20 times:
  1263. spawn firework at {bw.blue-team.%{bw.%player%.playing-arena}%::*}
  1264. wait 8 ticks
  1265. else if {bw.bluepoints.%{bw.%player%.playing-arena}%} = {bw.redpoints.%{bw.%player%.playing-arena}%}:
  1266. set {bw.phase.%{bw.%player%.playing-arena}%} to "overtime"
  1267. set {bw.time.%{bw.%player%.playing-arena}%} to 2 minutes
  1268. set {_lag} to 0
  1269. loop blocks within {bw.map-pos1.%{bw.%player%.playing-arena}%} to {bw.map-pos2.%{bw.%player%.playing-arena}%}:
  1270. if {_lag} > 50:
  1271. wait 1 seconds
  1272. set {_lag} to 0
  1273. if {bw.regen-blocks.%{bw.%player%.playing-arena}%::%location of loop-block%} is not set:
  1274. if loop-block is not air:
  1275. set loop-block to air
  1276. add 1 to {_lag}
  1277. send "&6%{bw.config-msg::game::phasestart-overtime}%" to {bw.players.%{bw.%player%.playing-arena}%::*}
  1278. loop 120 times:
  1279. if {bw.status.%{bw.%player%.playing-arena}%} is "Ingame":
  1280. loop {bw.players.%{bw.%player%.playing-arena}%::*}:
  1281. set {_sb} to loop-value-2
  1282. invoke "bw-ingamescoreboard" from {_sb}
  1283. remove 1 seconds from {bw.time.%{bw.%player%.playing-arena}%}
  1284. wait 1 seconds
  1285. else:
  1286. stop trigger
  1287. set {_arena} to {bw.%player%.playing-arena}
  1288. make console execute command "/blockwars stop %{_arena}%"
  1289. if {bw.redpoints.%{bw.%player%.playing-arena}%} > {bw.bluepoints.%{bw.%player%.playing-arena}%}:
  1290. send "%{bw.config-msg::win::red-win}%" to {bw.players.%{bw.%player%.playing-arena}%::*}
  1291. loop {bw.red-team.%{bw.%player%.playing-arena}%::*}:
  1292. add 1 to {bw.stats.wins::%loop-value%}
  1293. invoke "bw-give-rewards" from loop-value and "win"
  1294. loop {bw.players.%{bw.%player%.playing-arena}%::*}:
  1295. invoke "bw-endgame" from loop-value
  1296. loop 20 times:
  1297. spawn firework at {bw.red-team.%{bw.%player%.playing-arena}%::*}
  1298. wait 8 ticks
  1299. else if {bw.bluepoints.%{bw.%player%.playing-arena}%} > {bw.redpoints.%{bw.%player%.playing-arena}%}:
  1300. send "%{bw.config-msg::win::blue-win}%" to {bw.players.%{bw.%player%.playing-arena}%::*}
  1301. loop {bw.blue-team.%{bw.%player%.playing-arena}%::*}:
  1302. add 1 to {bw.stats.wins::%loop-value%}
  1303. invoke "bw-give-rewards" from loop-value and "win"
  1304. loop {bw.players.%{bw.%player%.playing-arena}%::*}:
  1305. invoke "bw-endgame" from loop-value
  1306. loop 20 times:
  1307. spawn firework at {bw.blue-team.%{bw.%player%.playing-arena}%::*}
  1308. wait 8 ticks
  1309. else if {bw.bluepoints.%{bw.%player%.playing-arena}%} = {bw.redpoints.%{bw.%player%.playing-arena}%}:
  1310. send "%{bw.config-msg::win::tie-game}%" to {bw.players.%{bw.%player%.playing-arena}%::*}
  1311. wait 5 seconds
  1312. loop {bw.players.%{bw.%player%.playing-arena}%::*}:
  1313. make loop-value execute command "/bw leave"
  1314. wait 1 seconds
  1315. make console execute command "/bw stop %{bw.%player%.playing-arena}%"
  1316. else:
  1317. send "%{bw.config::prefix}% &c%{bw.config-msg::error::full-game}%"
  1318. else:
  1319. send "%{bw.config::prefix}% &c%{bw.config-msg::error::not-available}%"
  1320. else:
  1321. send "%{bw.config::prefix}% &c%{bw.config-msg::error::not-exist}%"
  1322. else:
  1323. send "%{bw.config::prefix}% &c%{bw.config-msg::error::ingame}%"
  1324. else:
  1325. send "%{bw.config::prefix}% &cUse /blockwars join <arena>"
  1326. else:
  1327. send "%{bw.config::prefix}% &c%{bw.config-msg::error::no-permission}%"
  1328. else if sender is console:
  1329. send "%{bw.config::prefix}% &cThis command can only be executed by players!" to console
  1330. if arg 1 is "leave":
  1331. if sender is player:
  1332. if {bw.%player%.ingame} or {bw.%player%.lobby} is true:
  1333. wipe player's sidebar
  1334. set {bw.%player%.no-damage} to false
  1335. #loop all players:
  1336. #make loop-players see player's prefix as "&f"
  1337. #make player see loop-players's prefix as "&f"
  1338. set {bw.%player%.lobby} to false
  1339. set {bw.%player%.ingame} to false
  1340. set {bw.%player%.bandera} to false
  1341. remove player from {bw.%{bw.%player%.team}%-team.%{bw.%player%.playing-arena}%::*}
  1342. delete {bw.%{bw.%player%.team}%-team.%{bw.%player%.playing-arena}%::%player%}
  1343. remove player from {bw.players.%{bw.%player%.playing-arena}%::*}
  1344. loop {bw.players.%{bw.%player%.playing-arena}%::*}:
  1345. invoke "bw-lobbyscoreboard" from loop-value
  1346. set {bw.amountplayers.%{bw.%player%.playing-arena}%} to size of {bw.players.%{bw.%player%.playing-arena}%::*}
  1347. if {bw.status.%{bw.%player%.playing-arena}%} is "Ingame":
  1348. set {_msg-leave} to {bw.config-msg::listener::leave-broad-ingame}
  1349. set {_amount} to {bw.amountplayers.%{bw.%player%.playing-arena}%}
  1350. set {_max} to {bw.playerperteam.%{bw.%player%.playing-arena}%}*2
  1351. replace all "<player>" with "%player%" in {_msg-leave}
  1352. replace all "<amount>" with "%{_amount}%" in {_msg-leave}
  1353. replace all "<max>" with "%{_max}%" in {_msg-leave}
  1354. else:
  1355. set {_msg-leave} to {bw.config-msg::listener::leave-broad-lobby}
  1356. set {_amount} to {bw.amountplayers.%{bw.%player%.playing-arena}%}
  1357. set {_max} to {bw.playerperteam.%{bw.%player%.playing-arena}%}*2
  1358. replace all "<player>" with "%player%" in {_msg-leave}
  1359. replace all "<amount>" with "%{_amount}%" in {_msg-leave}
  1360. replace all "<max>" with "%{_max}%" in {_msg-leave}
  1361. if {_msg-leave} is set:
  1362. send "&f%{_msg-leave}%" to {bw.players.%{bw.%player%.playing-arena}%::*}
  1363. else:
  1364. send "&6%player% &eleft the game!" to {bw.players.%{bw.%player%.playing-arena}%::*}
  1365. set {_arena} to {bw.%player%.playing-arena}
  1366. clear player's inventory
  1367. if {bw.mainlobby} is set:
  1368. teleport player to {bw.mainlobby}
  1369. else:
  1370. teleport player to spawn
  1371. wait 1 tick
  1372. loop 37 times:
  1373. set {_id} to loop-number
  1374. remove 1 from {_id}
  1375. set slot {_id} of player's inventory to {bw.%player%.inv::%{_id}%}
  1376. set the helmet of player to {bw.%player%.armor::helmet}
  1377. set the chestplate of player to {bw.%player%.armor::chestplate}
  1378. set the leggings of player to {bw.%player%.armor::leggings}
  1379. set the boots of player to {bw.%player%.armor::boots}
  1380. set hunger of player to 20
  1381. set level of player to 0
  1382. remove mining fatigue and speed and haste and regeneration and slowness from player
  1383. heal the player
  1384. set {_arena} to {bw.%player%.playing-arena}
  1385. if {bw.status.%{_arena}%} is "Ingame":
  1386. if {bw.%player%.team} is "red":
  1387. if size of {bw.red-team.%{_arena}%::*} < 1:
  1388. send "%{bw.config-msg::win::blue-win}%" to {bw.players.%{_arena}%::*}
  1389. loop {bw.blue-team.%{bw.%player%.playing-arena}%::*}:
  1390. add 1 to {bw.stats.wins::%loop-value%}
  1391. invoke "bw-give-rewards" from loop-value and "win"
  1392. loop {bw.players.%{_arena}%::*}:
  1393. invoke "bw-endgame" from loop-value
  1394. loop 20 times:
  1395. spawn firework at {bw.blue-team.%{bw.%player%.playing-arena}%::*}
  1396. wait 8 ticks
  1397. wait 1 seconds
  1398. make console execute command "/blockwars stop %{_arena}%"
  1399. else if {bw.%player%.team} is "blue":
  1400. if size of {bw.blue-team.%{_arena}%::*} < 1:
  1401. send "%{bw.config-msg::win::red-win}%" to {bw.players.%{_arena}%::*}
  1402. loop {bw.red-team.%{bw.%player%.playing-arena}%::*}:
  1403. add 1 to {bw.stats.wins::%loop-value%}
  1404. invoke "bw-give-rewards" from loop-value and "win"
  1405. loop {bw.players.%{_arena}%::*}:
  1406. invoke "bw-endgame" from loop-value
  1407. loop 20 times:
  1408. spawn firework at {bw.red-team.%{_arena}%::*}
  1409. wait 8 ticks
  1410. wait 1 seconds
  1411. make console execute command "/blockwars stop %{_arena}%"
  1412. else if {bw.status.%{_arena}%} is "Waiting" or "Starting":
  1413. if size of {bw.players.%{_arena}%::*} < {bw.minplayers.%{_arena}%}:
  1414. set {bw.status.%{_arena}%} to "Waiting"
  1415. set {bw.countdown-started?.%{_arena}%} to false
  1416. wait 5 tick
  1417. invoke "bw-stats-hologram-update" from player
  1418. delete {bw.%player%.team}
  1419. delete {bw.%player%.kit}
  1420. delete {bw.%player%.playing-arena}
  1421. if {bw.status.%{_arena}%} is "Ingame":
  1422. if size of {bw.players.%{_arena}%::*} < 1:
  1423. make console execute command "/blockwars stop %{_arena}%"
  1424. else:
  1425. send "%{bw.config::prefix}% &c%{bw.config-msg::error::no-ingame}%"
  1426. else if sender is console:
  1427. send "%{bw.config::prefix}% &cThis command can only be executed by players!" to console
  1428.  
  1429. on command:
  1430. if command is {bw.config::leave-cmd}:
  1431. cancel event
  1432. make sender execute command "/blockwars leave"
  1433.  
  1434. on join:
  1435. if {bw.stats.wins::%player%} is not set:
  1436. set {bw.stats.wins::%player%} to 0
  1437. if {bw.stats.kills::%player%} is not set:
  1438. set {bw.stats.kills::%player%} to 0
  1439. if {bw.stats.deaths::%player%} is not set:
  1440. set {bw.stats.deaths::%player%} to 0
  1441. if {bw.stats.flags-captured::%player%} is not set:
  1442. set {bw.stats.flags-captured::%player%} to 0
  1443. if {bw.stats.games-played::%player%} is not set:
  1444. set {bw.stats.games-played::%player%} to 0
  1445. if {bw.stats.arrow-shoot::%player%} is not set:
  1446. set {bw.stats.arrow-shoot::%player%} to 0
  1447. if {bw.stats.arrow-hit::%player%} is not set:
  1448. set {bw.stats.arrow-hit::%player%} to 0
  1449. if {bw.stats.block-bloken::%player%} is not set:
  1450. set {bw.stats.block-bloken::%player%} to 0
  1451. if {bw.stats.block-placed::%player%} is not set:
  1452. set {bw.stats.block-placed::%player%} to 0
  1453.  
  1454. on join:
  1455. if {bw.loc-holo} is set:
  1456. set {_stats.holo} to {bw.config::hologram::stats-holo}
  1457. replace all "<wins>" with "%{bw.stats.wins::%player%}%" in {_stats.holo}
  1458. replace all "<kills>" with "%{bw.stats.kills::%player%}%" in {_stats.holo}
  1459. replace all "<deaths>" with "%{bw.stats.deaths::%player%}%" in {_stats.holo}
  1460. replace all "<flags-captured>" with "%{bw.stats.flags-captured::%player%}%" in {_stats.holo}
  1461. replace all "<games-played>" with "%{bw.stats.games-played::%player%}%" in {_stats.holo}
  1462. replace all "<arrow-shot>" with "%{bw.stats.arrow-shoot::%player%}%" in {_stats.holo}
  1463. replace all "<arrow-hit>" with "%{bw.stats.arrow-hit::%player%}%" in {_stats.holo}
  1464. replace all "<block-bloken>" with "%{bw.stats.block-bloken::%player%}%" in {_stats.holo}
  1465. replace all "<block-placed>" with "%{bw.stats.block-placed::%player%}%" in {_stats.holo}
  1466. replace all "<player>" with "%player%" in {_stats.holo}
  1467. replace all "//" with ";" in {_stats.holo}
  1468. evaluate "create interactive client side holo object ""%coloured {_stats.holo}%"" with id ""bw.%player%.holo-stats"" at {bw.loc-holo} to player"
  1469. on quit:
  1470. evaluate "delete holo object ""bw.%player%.holo-stats"""
  1471.  
  1472. on rightclick on anything:
  1473. if {bw.%player%.lobby} is true:
  1474. if tool of player is not air:
  1475. set {_name.kit} to "%{bw.config::item::kit-item-name}%"
  1476. set {_name.team} to "%{bw.config::item::team-item-name}%"
  1477. set {_name.leave} to "%{bw.config::item::leave-item-name}%"
  1478. if name of tool of player is {_name.kit}:
  1479. invoke "bw-gui-kits" from player
  1480. if name of tool of player is {_name.team}:
  1481. invoke "bw-team-gui" from player
  1482. if name of tool of player is {_name.leave}:
  1483. make player execute command "/blockwars leave"
  1484. send "&7%{bw.config::prefix}% &f%{bw.config-msg::listener::leave-msg}%"
  1485.  
  1486. on npc right click:
  1487. if {bw.%player%.ingame} is true:
  1488. invoke "bw-gui-kits" from player
  1489.  
  1490. on damage of player:
  1491. if {bw.%victim%.ingame} is true:
  1492. if "%damage cause%" is "projectile":
  1493. add 1 to {bw.stats.arrow-hit::%victim%}
  1494.  
  1495. on join:
  1496. set {bw.%player%.ingame} to false
  1497. set {bw.%player%.lobby} to false
  1498. set {bw.%player%.bandera} to false
  1499. set {bw.%player%.no-damage} to false
  1500. delete {bw.%player%.team}
  1501. on quit:
  1502. if {bw.%player%.ingame} or {bw.%player%.lobby} is true:
  1503. make player execute command "/blockwars leave"
  1504. set {bw.%player%.ingame} to false
  1505. set {bw.%player%.lobby} to false
  1506. set {bw.%player%.bandera} to false
  1507. set {bw.%player%.no-damage} to false
  1508. delete {bw.%player%.team}
  1509. on shoot:
  1510. if {bw.%shooter%.ingame} is true:
  1511. if projectile is a arrow:
  1512. add 1 to {bw.stats.arrow-shoot::%shooter%}
  1513. on place:
  1514. if {bw.%player%.ingame} is true:
  1515. add 1 to {bw.stats.block-placed::%player%}
  1516. if event-block is wool:
  1517. cancel event
  1518. on drop:
  1519. if {bw.%player%.lobby} is true:
  1520. cancel event
  1521. if {bw.%player%.ingame} is true:
  1522. cancel event
  1523. on damage:
  1524. if {bw.%victim%.lobby} is true:
  1525. cancel event
  1526. on break:
  1527. if {bw.%player%.lobby} is true:
  1528. cancel event
  1529. on place:
  1530. if {bw.%player%.lobby} is true:
  1531. cancel event
  1532. on pick up:
  1533. if {bw.%player%.lobby} is true:
  1534. cancel event
  1535. on hunger bar change:
  1536. if {bw.%player%.lobby} is true:
  1537. set hunger bar of player to 20
  1538. if {bw.%player%.ingame} is true:
  1539. set hunger bar of player to 20
  1540. on inventory click:
  1541. if {bw.%player%.lobby} is true:
  1542. cancel event
  1543. if {bw.%player%.ingame} is true:
  1544. cancel event
  1545. on chat:
  1546. if {bw.%player%.ingame} is true:
  1547. if {bw.%player%.no-damage} is false:
  1548. if {bw.status.%{bw.%player%.playing-arena}%} is "Ingame":
  1549. cancel event
  1550. if first character of message is "!" or "@":
  1551. set {_msg} to "%subtext of message from characters 2 to (length of message)%"
  1552. set {_format} to {bw.config::chat::global-chat}
  1553. replace all "<player>" with "%player%" in {_format}
  1554. replace all "<msg>" with "%{_msg}%" in {_format}
  1555. send "%{_format}%" to {bw.players.%{bw.%player%.playing-arena}%::*}
  1556. else:
  1557. set {_format} to {bw.config::chat::team-chat}
  1558. replace all "<player>" with "%player%" in {_format}
  1559. replace all "<msg>" with "%message%" in {_format}
  1560. send "%{_format}%" to {bw.%{bw.%player%.team}%-team.%{bw.%player%.playing-arena}%::*}
  1561. else:
  1562. cancel event
  1563. set {_format} to {bw.config::chat::lobby-chat}
  1564. replace all "<player>" with "%player%" in {_format}
  1565. replace all "<msg>" with "%message%" in {_format}
  1566. send "&7%{_format}%" to {bw.players.%{bw.%player%.playing-arena}%::*}
  1567. on damage of player:
  1568. if {bw.%victim%.no-damage} is true:
  1569. cancel event
  1570. on break:
  1571. if {bw.%player%.no-damage} is true:
  1572. cancel event
  1573. on damage of player:
  1574. if {bw.%victim%.ingame} is true:
  1575. if {bw.phase.%{bw.%victim%.playing-arena}%} is "build":
  1576. if damage was caused by void:
  1577. cancel event
  1578. teleport victim to {bw.%{bw.%victim%.team}%spawn.%{bw.%victim%.playing-arena}%}
  1579. else:
  1580. cancel event
  1581. on place:
  1582. if {bw.%player%.ingame} is true:
  1583. loop all blocks in radius 1.8 around event-block:
  1584. 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}:
  1585. send "&c%{bw.config-msg::error::no-build}%"
  1586. cancel event
  1587. on break:
  1588. if {bw.%player%.ingame} is true:
  1589. if location of event-block is not {bw.blueblock.%{bw.%player%.playing-arena}%} or {bw.redblock.%{bw.%player%.playing-arena}%}:
  1590. if {bw.regen-blocks.%{bw.%player%.playing-arena}%::%location of event-block%} is set:
  1591. cancel event
  1592. send "&c%{bw.config-msg::error::no-break}%"
  1593. else:
  1594. add 1 to {bw.stats.block-bloken::%player%}
  1595. if event-block is not red wool or blueglass or blue wool or redglass:
  1596. if tool of player is wood pickaxe:
  1597. set block at event-block to air
  1598.  
  1599. on break:
  1600. if location of event-block is {bw.blueblock.%{bw.%player%.playing-arena}%} or {bw.redblock.%{bw.%player%.playing-arena}%}:
  1601. cancel event
  1602. if {bw.phase.%{bw.%player%.playing-arena}%} is "figth" or "overtime":
  1603. add 1 to {bw.stats.flags-captured::%player%}
  1604. invoke "bw-give-rewards" from player and "capture"
  1605. if event-block is red wool:
  1606. if {bw.%player%.team} is "red":
  1607. send "&c%{bw.config-msg::error::capture-own-flag}%"
  1608. cancel event
  1609. else if {bw.%player%.team} is "blue":
  1610. cancel event
  1611. set block at event-block to blueglass
  1612. set slot 8 of player's inventory to red wool named "&6Red Flag"
  1613. set {bw.%player%.bandera} to true
  1614. set the helmet of player to brojo
  1615. apply slowness 2 to player for 999 days
  1616. set {_msg-flagtaken} to {bw.config-msg::game::flag-taken}
  1617. set {_msg-ftaken::*} to coloured {_msg-flagtaken} split at "//"
  1618. set {_team} to "&cRed"
  1619. replace all "<team>" with "%{_team}%" in {_msg-ftaken::2}
  1620. replace all "<player>" with "&9%player%" in {_msg-ftaken::2}
  1621. loop {bw.red-team.%{bw.%player%.playing-arena}%::*}:
  1622. set {_p} to loop-value
  1623. send {_p} title "&c&l%{_msg-ftaken::1}%" with subtitle "%{_msg-ftaken::2}%" for 5 seconds
  1624. loop {bw.blue-team.%{bw.%player%.playing-arena}%::*}:
  1625. set {_p} to loop-value
  1626. send {_p} title "&a&l%{_msg-ftaken::1}%" with subtitle "%{_msg-ftaken::2}%" for 5 seconds
  1627. if event-block is blue wool:
  1628. if {bw.%player%.team} is "blue":
  1629. send "&c%{bw.config-msg::error::capture-own-flag}%"
  1630. cancel event
  1631. else if {bw.%player%.team} is "red":
  1632. cancel event
  1633. set block at event-block to redglass
  1634. set slot 8 of player's inventory to blue wool named "&6Blue Flag"
  1635. set {bw.%player%.bandera} to true
  1636. set the helmet of player to bazul
  1637. apply slowness 2 to player for 999 days
  1638. set {_msg-flagtaken} to {bw.config-msg::game::flag-taken}
  1639. set {_msg-ftaken::*} to coloured {_msg-flagtaken} split at "//"
  1640. set {_team} to "&9Blue"
  1641. replace all "<team>" with "%{_team}%" in {_msg-ftaken::2}
  1642. replace all "<player>" with "&c%player%" in {_msg-ftaken::2}
  1643. loop {bw.blue-team.%{bw.%player%.playing-arena}%::*}:
  1644. set {_p} to loop-value
  1645. send {_p} title "&c&l%{_msg-ftaken::1}%" with subtitle "%{_msg-ftaken::2}%" for 5 seconds
  1646. loop {bw.red-team.%{bw.%player%.playing-arena}%::*}:
  1647. set {_p} to loop-value
  1648. send {_p} title "&a&l%{_msg-ftaken::1}%" with subtitle "%{_msg-ftaken::2}%" for 5 seconds
  1649. if event-block is redglass:
  1650. cancel event
  1651. if event-block is blueglass:
  1652. cancel event
  1653. else if {bw.phase.%{bw.%player%.playing-arena}%} is "build":
  1654. cancel event
  1655. on damage of player:
  1656. if {bw.%victim%.ingame} is true:
  1657. if {bw.phase.%{bw.%victim%.playing-arena}%} is "figth" or "overtime":
  1658. if damage is greater than or equal to health of victim:
  1659. add 1 to {bw.stats.deaths::%victim%}
  1660. if attacker is set:
  1661. set {_msg-kill} to {bw.config-msg::pvp::kill-player}
  1662. replace all "<victim>" with "<%{bw.%victim%.team}%>%victim%" in {_msg-kill}
  1663. replace all "<attacker>" with "<%{bw.%attacker%.team}%>%attacker%" in {_msg-kill}
  1664. send "%{_msg-kill}%" to {bw.players.%{bw.%victim%.playing-arena}%::*}
  1665. add 1 to {bw.stats.kills::%attacker%}
  1666. invoke "bw-give-rewards" from attacker and "kill"
  1667. else:
  1668. set {_msg-died} to {bw.config-msg::pvp::death-player}
  1669. replace all "<victim>" with "<%{bw.%victim%.team}%>%victim%" in {_msg-died}
  1670. send "%{_msg-died}%" to {bw.players.%{bw.%victim%.playing-arena}%::*}
  1671. heal victim
  1672. cancel event
  1673. remove slowness from victim
  1674. if {bw.config::config::regeneration-effect} is "true":
  1675. apply regeneration 1 to victim for 999 days
  1676. apply mining fatigue 1 to victim for 999 days
  1677. if {bw.%victim%.bandera} is true:
  1678. if attacker is set:
  1679. invoke "bw-give-rewards" from attacker and "dropped"
  1680. set {bw.%victim%.bandera} to false
  1681. if {bw.%victim%.team} is "red":
  1682. set block at {bw.blueblock.%{bw.%victim%.playing-arena}%} to blue wool
  1683. set {_msg-flagdropped} to {bw.config-msg::game::flag-dropped}
  1684. set {_msg-fdropped::*} to coloured {_msg-flagdropped} split at "//"
  1685. set {_team} to "&9Blue"
  1686. replace all "<team>" with "%{_team}%" in {_msg-fdropped::2}
  1687. replace all "<player>" with "&c%victim%" in {_msg-fdropped::2}
  1688. loop {bw.red-team.%{bw.%victim%.playing-arena}%::*}:
  1689. set {_p} to loop-value
  1690. send {_p} title "&4&l%{_msg-fdropped::1}%" with subtitle "%{_msg-fdropped::2}%" for 5 seconds
  1691. loop {bw.blue-team.%{bw.%victim%.playing-arena}%::*}:
  1692. set {_p} to loop-value
  1693. send {_p} title "&2&l%{_msg-fdropped::1}%" with subtitle "%{_msg-fdropped::2}%" for 5 seconds
  1694. if {bw.%victim%.team} is "blue":
  1695. set block at {bw.redblock.%{bw.%victim%.playing-arena}%} to red wool
  1696. set {_msg-flagdropped} to {bw.config-msg::game::flag-dropped}
  1697. set {_msg-fdropped::*} to coloured {_msg-flagdropped} split at "//"
  1698. set {_team} to "&cRed"
  1699. replace all "<team>" with "%{_team}%" in {_msg-fdropped::2}
  1700. replace all "<player>" with "&9%victim%" in {_msg-fdropped::2}
  1701. loop {bw.red-team.%{bw.%victim%.playing-arena}%::*}:
  1702. set {_p} to loop-value
  1703. send {_p} title "&2&l%{_msg-fdropped::1}%" with subtitle "%{_msg-fdropped::2}%" for 5 seconds
  1704. loop {bw.blue-team.%{bw.%victim%.playing-arena}%::*}:
  1705. set {_p} to loop-value
  1706. send {_p} title "&4&l%{_msg-fdropped::1}%" with subtitle "%{_msg-fdropped::2}%" for 5 seconds
  1707. teleport victim to {bw.%{bw.%victim%.team}%spawn.%{bw.%victim%.playing-arena}%}
  1708. clear victim's inventory
  1709. set gamemode of victim to spectator
  1710. set {_seg} to 10
  1711. loop {_seg} times:
  1712. set {_msg-respawn-screen} to {bw.config-msg::pvp::respawn-screen}
  1713. replace all "<time>" with "%{_seg}%" in {_msg-respawn-screen}
  1714. send victim title "" with subtitle "%{_msg-respawn-screen}%" for 1 seconds
  1715. remove 1 from {_seg}
  1716. wait 1 seconds
  1717. set gamemode of victim to survival
  1718. invoke "bw-give-kits" from victim and {bw.%victim%.kit}
  1719. teleport victim to {bw.%{bw.%victim%.team}%spawn.%{bw.%victim%.playing-arena}%}
  1720. on damage of player:
  1721. if attacker is set:
  1722. if {bw.%victim%.playing-arena} = {bw.%attacker%.playing-arena}:
  1723. if {bw.%victim%.team} = {bw.%attacker%.team}:
  1724. cancel event
  1725. send "&c%{bw.config-msg::error::damage-own-team}%" to attacker
  1726. on rightclick:
  1727. if {bw.%player%.bandera} is true:
  1728. if {bw.phase.%{bw.%player%.playing-arena}%} is "figth":
  1729. if clicked block is red wool or blueglass:
  1730. if {bw.%player%.team} is "red":
  1731. add 1 to {bw.redpoints.%{bw.%player%.playing-arena}%}
  1732. set slot 8 of player's inventory to air
  1733. set block at {bw.blueblock.%{bw.%player%.playing-arena}%} to blue wool
  1734. set the helmet of player to leather helmet
  1735. remove slowness from player
  1736. set {bw.%player%.bandera} to false
  1737. set {_msg-flagcaptured} to {bw.config-msg::game::flag-captured}
  1738. set {_msg-fcaptured::*} to coloured {_msg-flagcaptured} split at "//"
  1739. set {_team} to "&9Blue"
  1740. replace all "<team>" with "%{_team}%" in {_msg-fcaptured::2}
  1741. replace all "<player>" with "&c%player%" in {_msg-fcaptured::2}
  1742. loop {bw.red-team.%{bw.%player%.playing-arena}%::*}:
  1743. set {_p} to loop-value
  1744. send {_p} title "&2&l%{_msg-fcaptured::1}%" with subtitle "%{_msg-fcaptured::2}%" for 5 seconds
  1745. loop {bw.blue-team.%{bw.%player%.playing-arena}%::*}:
  1746. set {_p} to loop-value
  1747. send {_p} title "&4&l%{_msg-fcaptured::1}%" with subtitle "%{_msg-fcaptured::2}%" for 5 seconds
  1748. spawn a firework at clicked block
  1749. if clicked block is blue wool or redglass:
  1750. if {bw.%player%.team} is "blue":
  1751. add 1 to {bw.bluepoints.%{bw.%player%.playing-arena}%}
  1752. set slot 8 of player's inventory to air
  1753. set block at {bw.redblock.%{bw.%player%.playing-arena}%} to red wool
  1754. set the helmet of player to leather helmet
  1755. remove slowness from player
  1756. set {bw.%player%.bandera} to false
  1757. set {_msg-flagcaptured} to {bw.config-msg::game::flag-captured}
  1758. set {_msg-fcaptured::*} to coloured {_msg-flagcaptured} split at "//"
  1759. set {_team} to "&cRed"
  1760. replace all "<team>" with "%{_team}%" in {_msg-fcaptured::2}
  1761. replace all "<player>" with "&9%player%" in {_msg-fcaptured::2}
  1762. loop {bw.red-team.%{bw.%player%.playing-arena}%::*}:
  1763. set {_p} to loop-value
  1764. send {_p} title "&4&l%{_msg-fcaptured::1}%" with subtitle "%{_msg-fcaptured::2}%" for 5 seconds
  1765. loop {bw.blue-team.%{bw.%player%.playing-arena}%::*}:
  1766. set {_p} to loop-value
  1767. send {_p} title "&2&l%{_msg-fcaptured::1}%" with subtitle "%{_msg-fcaptured::2}%" for 5 seconds
  1768. spawn a firework at clicked block
  1769. else if {bw.phase.%{bw.%player%.playing-arena}%} is "overtime":
  1770. if clicked block is red wool or blueglass:
  1771. if {bw.%player%.team} is "red":
  1772. add 1 to {bw.redpoints.%{bw.%player%.playing-arena}%}
  1773. set slot 8 of player's inventory to air
  1774. set block at {bw.blueblock.%{bw.%player%.playing-arena}%} to blue wool
  1775. set the helmet of player to leather helmet
  1776. remove slowness from player
  1777. set {bw.%player%.bandera} to false
  1778. set {_msg-flagcaptured} to {bw.config-msg::game::flag-captured}
  1779. set {_msg-fcaptured::*} to coloured {_msg-flagcaptured} split at "//"
  1780. set {_team} to "&9Blue"
  1781. replace all "<team>" with "%{_team}%" in {_msg-fcaptured::2}
  1782. replace all "<player>" with "&c%player%" in {_msg-fcaptured::2}
  1783. loop {bw.red-team.%{bw.%player%.playing-arena}%::*}:
  1784. set {_p} to loop-value
  1785. send {_p} title "&2&l%{_msg-fcaptured::1}%" with subtitle "%{_msg-fcaptured::2}%" for 5 seconds
  1786. loop {bw.blue-team.%{bw.%player%.playing-arena}%::*}:
  1787. set {_p} to loop-value
  1788. send {_p} title "&4&l%{_msg-fcaptured::1}%" with subtitle "%{_msg-fcaptured::2}%" for 5 seconds
  1789. spawn a firework at clicked block
  1790. send "%{bw.config-msg::win::red-win}%" to {bw.players.%{bw.%player%.playing-arena}%::*}
  1791. loop {bw.red-team.%{bw.%player%.playing-arena}%::*}:
  1792. add 1 to {bw.stats.wins::%loop-value%}
  1793. invoke "bw-give-rewards" from loop-value and "win"
  1794. loop {bw.players.%{bw.%player%.playing-arena}%::*}:
  1795. invoke "bw-endgame" from loop-value
  1796. loop 20 times:
  1797. spawn firework at {bw.red-team.%{bw.%player%.playing-arena}%::*}
  1798. wait 8 ticks
  1799. set {_arena} to {bw.%player%.playing-arena}
  1800. loop {bw.players.%{bw.%player%.playing-arena}%::*}:
  1801. make loop-value execute command "/bw leave"
  1802. wait 1 seconds
  1803. make console execute command "/bw stop %{_arena}%"
  1804. if clicked block is blue wool or redglass:
  1805. if {bw.%player%.team} is "blue":
  1806. add 1 to {bw.bluepoints.%{bw.%player%.playing-arena}%}
  1807. set slot 8 of player's inventory to air
  1808. set block at {bw.redblock.%{bw.%player%.playing-arena}%} to red wool
  1809. set the helmet of player to leather helmet
  1810. remove slowness from player
  1811. set {bw.%player%.bandera} to false
  1812. set {_msg-flagcaptured} to {bw.config-msg::game::flag-captured}
  1813. set {_msg-fcaptured::*} to coloured {_msg-flagcaptured} split at "//"
  1814. set {_team} to "&cRed"
  1815. replace all "<team>" with "%{_team}%" in {_msg-fcaptured::2}
  1816. replace all "<player>" with "&9%player%" in {_msg-fcaptured::2}
  1817. loop {bw.red-team.%{bw.%player%.playing-arena}%::*}:
  1818. set {_p} to loop-value
  1819. send {_p} title "&4&l%{_msg-fcaptured::1}%" with subtitle "%{_msg-fcaptured::2}%" for 5 seconds
  1820. loop {bw.blue-team.%{bw.%player%.playing-arena}%::*}:
  1821. set {_p} to loop-value
  1822. send {_p} title "&2&l%{_msg-fcaptured::1}%" with subtitle "%{_msg-fcaptured::2}%" for 5 seconds
  1823. spawn a firework at clicked block
  1824. send "%{bw.config-msg::win::blue-win}%" to {bw.players.%{bw.%player%.playing-arena}%::*}
  1825. loop {bw.blue-team.%{bw.%player%.playing-arena}%::*}:
  1826. add 1 to {bw.stats.wins::%loop-value%}
  1827. invoke "bw-give-rewards" from loop-value and "win"
  1828. loop {bw.players.%{bw.%player%.playing-arena}%::*}:
  1829. invoke "bw-endgame" from loop-value
  1830. loop 20 times:
  1831. spawn firework at {bw.blue-team.%{bw.%player%.playing-arena}%::*}
  1832. wait 8 ticks
  1833. set {_arena} to {bw.%player%.playing-arena}
  1834. loop {bw.players.%{bw.%player%.playing-arena}%::*}:
  1835. make loop-value execute command "/bw leave"
  1836. wait 1 seconds
  1837. make console execute command "/bw stop %{_arena}%"
  1838. on join:
  1839. if player has permission "blockwars.admin":
  1840. delete {bw-setup.%player%.pos1}
  1841. delete {bw-setup.%player%.pos2}
  1842. on quit:
  1843. if player has permission "blockwars.admin":
  1844. delete {bw-setup.%player%.pos1}
  1845. delete {bw-setup.%player%.pos2}
  1846.  
  1847. on place a blue wool:
  1848. if name of tool of player is "&9Set Blue Villager":
  1849. if player has permission "blockwars.admin":
  1850. cancel event
  1851. set {_arena} to uncolored lore of tool of player
  1852. create a citizen named "%{bw.config::kit::villager-name}%" at event-block
  1853. set {_id} to last created citizen
  1854. if player is op:
  1855. make player execute command "/npc select %{_id}%"
  1856. make player execute command "/npc type Villager"
  1857. else:
  1858. op the player
  1859. wait 1 tick
  1860. make player execute command "/npc select %{_id}%"
  1861. make player execute command "/npc type Villager"
  1862. wait 1 tick
  1863. deop the player
  1864. make citizen {_id} invulnerable
  1865. set citizen {_id} nametag visible
  1866. give npc {_id} the look close trait
  1867. set {bw.blue-villager.%{_arena}%::id} to last created citizen
  1868. set {bw.blue-villager.%{_arena}%::location} to location of event-block
  1869. send "&aYou have set the villager of the &9Blue &ateam of game %{_arena}%!"
  1870. else:
  1871. cancel event
  1872. send "&c%{bw.config-msg::error::no-permission}%"
  1873. on place a red wool:
  1874. if name of tool of player is "&4Set Red Villager":
  1875. if player has permission "blockwars.admin":
  1876. cancel event
  1877. set {_arena} to uncolored lore of tool of player
  1878. create a citizen named "%{bw.config::kit::villager-name}%" at event-block
  1879. set {_id} to last created citizen
  1880. if player is op:
  1881. make player execute command "/npc select %{_id}%"
  1882. make player execute command "/npc type Villager"
  1883. else:
  1884. op the player
  1885. wait 1 tick
  1886. make player execute command "/npc select %{_id}%"
  1887. make player execute command "/npc type Villager"
  1888. wait 1 tick
  1889. deop the player
  1890. make citizen {_id} invulnerable
  1891. set citizen {_id} nametag visible
  1892. give npc {_id} the look close trait
  1893. set {bw.red-villager.%{_arena}%::id} to last created citizen
  1894. set {bw.red-villager.%{_arena}%::location} to location of event-block
  1895. send "&aYou have set the villager of the &cRed &ateam of game %{_arena}%!"
  1896. else:
  1897. cancel event
  1898. send "&c%{bw.config-msg::error::no-permission}%"
  1899. on place a blue wool:
  1900. if name of tool of player is "&9Set Blue Block":
  1901. if player has permission "blockwars.admin":
  1902. set {_arena} to uncolored lore of tool of player
  1903. set {bw.blueblock.%{_arena}%} to location of event-block
  1904. set block at {bw.blueblock.%{_arena}%} to blue wool
  1905. send "&aYou have set the block of the &9Blue &ateam of game %{_arena}%!"
  1906. else:
  1907. cancel event
  1908. send "&c%{bw.config-msg::error::no-permission}%"
  1909. on place a red wool:
  1910. if name of tool of player is "&4Set Red Block":
  1911. if player has permission "blockwars.admin":
  1912. set {_arena} to uncolored lore of tool of player
  1913. set {bw.redblock.%{_arena}%} to location of event-block
  1914. set block at {bw.redblock.%{_arena}%} to red wool
  1915. send "&aYou have set the block of the &cRed &ateam of game %{_arena}%!"
  1916. else:
  1917. cancel event
  1918. send "&c%{bw.config-msg::error::no-permission}%"
  1919. on place a blue wool:
  1920. if name of tool of player is "&9Set Blue Spawn":
  1921. if player has permission "blockwars.admin":
  1922. set {_arena} to uncolored lore of tool of player
  1923. set {bw.bluespawn.%{_arena}%} to location of event-block
  1924. send "&aYou have set the spawn point of the &9Blue &ateam of game %{_arena}%!"
  1925. cancel event
  1926. else:
  1927. cancel event
  1928. send "&c%{bw.config-msg::error::no-permission}%"
  1929. on place a red wool:
  1930. if name of tool of player is "&4Set Red Spawn":
  1931. if player has permission "blockwars.admin":
  1932. set {_arena} to uncolored lore of tool of player
  1933. set {bw.redspawn.%{_arena}%} to location of event-block
  1934. send "&aYou have set the spawn point of the &cRed &ateam of game %{_arena}%!"
  1935. cancel event
  1936. else:
  1937. cancel event
  1938. send "&c%{bw.config-msg::error::no-permission}%"
  1939. on rightclick with arrow:
  1940. if name of tool of player is "&a&lBlockWars Tool":
  1941. if player has permission "blockwars.admin":
  1942. if clicked block is not air:
  1943. set {bw-setup.%player%.pos2} to location of clicked block
  1944. send "&aYou have set the position 2!"
  1945. cancel event
  1946. else:
  1947. cancel event
  1948. send "&c%{bw.config-msg::error::no-permission}%"
  1949. on leftclick with arrow:
  1950. if name of tool of player is "&a&lBlockWars Tool":
  1951. if player has permission "blockwars.admin":
  1952. if clicked block is not air:
  1953. set {bw-setup.%player%.pos1} to location of clicked block
  1954. send "&aYou have set the position 1!"
  1955. cancel event
  1956. else:
  1957. cancel event
  1958. send "&c%{bw.config-msg::error::no-permission}%"
  1959.  
  1960. on sign change:
  1961. if player has permission "blockwars.admin":
  1962. if line 1 is "[blockwars]" or "[bw]":
  1963. if line 2 is "join" or "Join":
  1964. if {bw.arena.%uncolored line 3%} is set:
  1965. set line 1 to "%{bw.config::sign::header}%"
  1966. set line 2 to "&eLoading..."
  1967. set line 3 to "&7%uncolored line 3%"
  1968. set line 4 to "&8*/*"
  1969. if {bw.config::sign-block.enable} is "true":
  1970. if block 1 behind the block at event-block is not air:
  1971. set block 1 behind the block at event-block to "95:0" parsed as item
  1972. set {bw.sign-loc::%location of event-block%} to location of event-block
  1973. set {bw.sign-loc::%location of event-block%} to location of event-block
  1974. send "%{bw.config::prefix}% &aSign successfully placed!"
  1975. else:
  1976. set line 1 to "%{bw.config::sign::header}%"
  1977. set line 2 to "&cError"
  1978. send "&cThis game does not exist!"
  1979. on break a sign or wall sign:
  1980. if {bw.sign-loc::%location of event-block%} is set:
  1981. if player is op:
  1982. delete {bw.sign-loc::%location of event-block%}
  1983. send "%{bw.config::prefix}% &cSign Removed!"
  1984. else:
  1985. cancel event
  1986. every 5 seconds:
  1987. if {bw.sign-loc::*} is set:
  1988. loop {bw.sign-loc::*}:
  1989. set {_block} to block at {bw.sign-loc::%loop-value%}
  1990. if "%{_block}%" is not "sign" or "wall sign":
  1991. set {_loc} to location of {_block}
  1992. set block at {_loc} to air
  1993. delete {bw.sign-loc::%{_loc}%}
  1994. send "&cSign removed! [%{_loc}%]" to console
  1995. send "&cSign removed! [%{_loc}%]" to all ops
  1996. else:
  1997. set {_arena.sign} to uncolored line 3 of {_block}
  1998. if {bw.arena.%{_arena.sign}%} is set:
  1999. if {bw.status.%{_arena.sign}%} is "Waiting":
  2000. set line 1 of {_block} to "%{bw.config::sign::header}%"
  2001. set line 2 of {_block} to "&a%{bw.config::sign::waiting}%"
  2002. set line 3 of {_block} to "&7%{_arena.sign}%"
  2003. set line 4 of {_block} to "&8%{bw.amountplayers.%{_arena.sign}%}%/%{bw.playerperteam.%{_arena.sign}%}*2%"
  2004. if {bw.config::sign-block.enable} is "true":
  2005. if block 1 behind the block at {_block} is not air:
  2006. set block 1 behind the block at {_block} to "%{bw.config::sign-block.waiting}%" parsed as item
  2007. else if {bw.status.%{_arena.sign}%} is "Starting":
  2008. set line 1 of {_block} to "%{bw.config::sign::header}%"
  2009. set line 2 of {_block} to "&6%{bw.config::sign::starting}%"
  2010. set line 3 of {_block} to "&7%{_arena.sign}%"
  2011. set line 4 of {_block} to "&8%{bw.amountplayers.%{_arena.sign}%}%/%{bw.playerperteam.%{_arena.sign}%}*2%"
  2012. if {bw.config::sign-block.enable} is "true":
  2013. if block 1 behind the block at {_block} is not air:
  2014. set block 1 behind the block at {_block} to "%{bw.config::sign-block.starting}%" parsed as item
  2015. else if {bw.status.%{_arena.sign}%} is "Ingame":
  2016. set line 1 of {_block} to "%{bw.config::sign::header}%"
  2017. set line 2 of {_block} to "&c%{bw.config::sign::gingame}%"
  2018. set line 3 of {_block} to "&7%{_arena.sign}%"
  2019. set line 4 of {_block} to "&8%{bw.amountplayers.%{_arena.sign}%}%/%{bw.playerperteam.%{_arena.sign}%}*2%"
  2020. if {bw.config::sign-block.enable} is "true":
  2021. if block 1 behind the block at {_block} is not air:
  2022. set block 1 behind the block at {_block} to "%{bw.config::sign-block.gingame}%" parsed as item
  2023. else if {bw.status.%{_arena.sign}%} is "Rebuild":
  2024. set line 1 of {_block} to "%{bw.config::sign::header}%"
  2025. set line 2 of {_block} to "&5%{bw.config::sign::rebuild}%"
  2026. set line 3 of {_block} to "&7%{_arena.sign}%"
  2027. set line 4 of {_block} to "&8%{bw.amountplayers.%{_arena.sign}%}%/%{bw.playerperteam.%{_arena.sign}%}*2%"
  2028. if {bw.config::sign-block.enable} is "true":
  2029. if block 1 behind the block at {_block} is not air:
  2030. set block 1 behind the block at {_block} to "%{bw.config::sign-block.rebuild}%" parsed as item
  2031. else if {bw.status.%{_arena.sign}%} is "NotReady":
  2032. set line 1 of {_block} to "%{bw.config::sign::header}%"
  2033. set line 2 of {_block} to "&4%{bw.config::sign::notready}%"
  2034. set line 3 of {_block} to "&7%{_arena.sign}%"
  2035. set line 4 of {_block} to "&8%{bw.amountplayers.%{_arena.sign}%}%/%{bw.playerperteam.%{_arena.sign}%}*2%"
  2036. if {bw.config::sign-block.enable} is "true":
  2037. if block 1 behind the block at {_block} is not air:
  2038. set block 1 behind the block at {_block} to "%{bw.config::sign-block.notready}%" parsed as item
  2039. chance of 50%:
  2040. wait 1 seconds
  2041. else:
  2042. wait 0.5 seconds
  2043. on rightclick on sign or wall sign:
  2044. if {bw.sign-loc::%location of clicked block%} is set:
  2045. set {_block} to block at {bw.sign-loc::%location of clicked block%}
  2046. set {_arena.join} to uncolored line 3 of {_block}
  2047. wait 0.1 ticks
  2048. make player execute command "/blockwars join %{_arena.join}%"
  2049.  
  2050. sub "bw-give-rewards":
  2051. set {_p} to parameter 1
  2052. set {_type} to parameter 2
  2053. set {_money.enable} to yaml value "config.rewards.%{_type}%.money.enable" from file "../../BlockWars/rewards.yml"
  2054. set {_command.enable} to yaml value "config.rewards.%{_type}%.command.enable" from file "../../BlockWars/rewards.yml"
  2055. set {_message.enable} to yaml value "config.rewards.%{_type}%.message.enable" from file "../../BlockWars/rewards.yml"
  2056. if {_money.enable} is "true":
  2057. set {_money.amount} to yaml value "config.rewards.%{_type}%.money.amount" from file "../../BlockWars/rewards.yml"
  2058. set {_money.amount} to {_money.amount} parsed as integer
  2059. evaluate "add {_money.amount} to balance of {_p}"
  2060. if {_command.enable} is "true":
  2061. set {_cmd} to yaml value "config.rewards.%{_type}%.command.cmd" from file "../../BlockWars/rewards.yml"
  2062. if {_cmd} is set:
  2063. replace all "<player>" with "%{_p}%" in {_cmd}
  2064. make console execute command "%{_cmd}%"
  2065. if {_message.enable} is "true":
  2066. set {_msg} to yaml value "config.rewards.%{_type}%.message.msg" from file "../../BlockWars/rewards.yml"
  2067. send "%{_msg}%" to {_p}
  2068. sub "bw-team-gui":
  2069. set {_p} to parameter 1
  2070. set {_arena} to {bw.%{_p}%.playing-arena}
  2071. open chest with 1 rows named "%{bw.config::item::team-item-name}%" to {_p}
  2072. wait 1 tick
  2073. if size of {bw.blue-team.%{_arena}%::*} > 0:
  2074. loop {bw.blue-team.%{_arena}%::*}:
  2075. set {_players.blueteam::%loop-value%} to "&7- &e%loop-value%||"
  2076. set {_lore.blue} to "%{_players.blueteam::*}%"
  2077. clear {_players.blueteam::*}
  2078. replace all " ," with "," in {_lore.blue}
  2079. replace all ", " with "," in {_lore.blue}
  2080. replace all " , " with "," in {_lore.blue}
  2081. replace all "," with "" in {_lore.blue}
  2082. replace all " and" with "and" in {_lore.blue}
  2083. replace all "and " with "and" in {_lore.blue}
  2084. replace all " and " with "and" in {_lore.blue}
  2085. replace all "and" with "" in {_lore.blue}
  2086. 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"]
  2087. else:
  2088. 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"]
  2089. if size of {bw.red-team.%{_arena}%::*} > 0:
  2090. loop {bw.red-team.%{_arena}%::*}:
  2091. set {_players.redteam::%loop-value%} to "&7- &e%loop-value%||"
  2092. set {_lore.red} to "%{_players.redteam::*}%"
  2093. clear {_players.redteam::*}
  2094. replace all " ," with "," in {_lore.red}
  2095. replace all ", " with "," in {_lore.red}
  2096. replace all " , " with "," in {_lore.red}
  2097. replace all "," with "" in {_lore.red}
  2098. replace all " and" with "and" in {_lore.red}
  2099. replace all "and " with "and" in {_lore.red}
  2100. replace all " and " with "and" in {_lore.red}
  2101. replace all "and" with "" in {_lore.red}
  2102. 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"]
  2103. else:
  2104. 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"]
  2105. sub "bw-selectteam":
  2106. set {_p} to parameter 1
  2107. set {_arena} to {bw.%{_p}%.playing-arena}
  2108. set {_team} to parameter 2
  2109. if {_team} is "red":
  2110. if {bw.%{_p}%.team} is "red":
  2111. send "%{bw.config-msg::game::jointeam-red}%" to {_p}
  2112. else:
  2113. if size of {bw.red-team.%{_arena}%::*} < {bw.playerperteam.%{_arena}%}:
  2114. set {bw.%{_p}%.team} to "red"
  2115. set {bw.red-team.%{_arena}%::%{_p}%} to {_p}
  2116. delete {bw.blue-team.%{_arena}%::%{_p}%}
  2117. remove {_p} from {bw.blue-team.%{_arena}%::*}
  2118. send "%{bw.config-msg::game::jointeam-red}%" to {_p}
  2119. else:
  2120. send "&c%{bw.config-msg::error::full-team}%" to {_p}
  2121. else if {_team} is "blue":
  2122. if {bw.%{_p}%.team} is "blue":
  2123. send "%{bw.config-msg::game::jointeam-blue}%" to {_p}
  2124. else:
  2125. if size of {bw.blue-team.%{_arena}%::*} < {bw.playerperteam.%{_arena}%}:
  2126. set {bw.%{_p}%.team} to "blue"
  2127. set {bw.blue-team.%{_arena}%::%{_p}%} to {_p}
  2128. remove {_p} from {bw.red-team.%{_arena}%::*}
  2129. delete {bw.red-team.%{_arena}%::%{_p}%}
  2130. send "%{bw.config-msg::game::jointeam-blue}%" to {_p}
  2131. else:
  2132. send "&c%{bw.config-msg::error::full-team}%" to {_p}
  2133. sub "bw-stats-hologram-update":
  2134. set {_p} to parameter 1
  2135. evaluate "delete holo object ""bw.%{_p}%.holo-stats"""
  2136. wait 1 tick
  2137. set {_stats.holo} to {bw.config::hologram::stats-holo}
  2138. replace all "<wins>" with "%{bw.stats.wins::%{_p}%}%" in {_stats.holo}
  2139. replace all "<kills>" with "%{bw.stats.kills::%{_p}%}%" in {_stats.holo}
  2140. replace all "<deaths>" with "%{bw.stats.deaths::%{_p}%}%" in {_stats.holo}
  2141. replace all "<flags-captured>" with "%{bw.stats.flags-captured::%{_p}%}%" in {_stats.holo}
  2142. replace all "<games-played>" with "%{bw.stats.games-played::%{_p}%}%" in {_stats.holo}
  2143. replace all "<arrow-shot>" with "%{bw.stats.arrow-shoot::%{_p}%}%" in {_stats.holo}
  2144. replace all "<arrow-hit>" with "%{bw.stats.arrow-hit::%{_p}%}%" in {_stats.holo}
  2145. replace all "<block-bloken>" with "%{bw.stats.block-bloken::%{_p}%}%" in {_stats.holo}
  2146. replace all "<block-placed>" with "%{bw.stats.block-placed::%{_p}%}%" in {_stats.holo}
  2147. replace all "<player>" with "%{_p}%" in {_stats.holo}
  2148. replace all "//" with ";" in {_stats.holo}
  2149. evaluate "create interactive client side holo object ""%coloured {_stats.holo}%"" with id ""bw.%{_p}%.holo-stats"" at {bw.loc-holo} to {_p}"
  2150. sub "bw-gui-kits":
  2151. set {_p} to parameter 1
  2152. set {_kits::*} to yaml nodes "config.kits" from file "../../BlockWars/kits.yml"
  2153. if {_kits::*} is set:
  2154. set {_rows} to size of {_kits::*}/9
  2155. if {_rows} < 1:
  2156. set {_rows} to 1
  2157. else if {_rows} > 6:
  2158. set {_rows} to 6
  2159. set {_slot} to 0
  2160. open chest with {_rows} rows named "%{bw.config::kit::title-gui}%" to {_p}
  2161. wait 1 tick
  2162. loop {_kits::*}:
  2163. set {_name} to yaml value "config.kits.%loop-value%.name" from file "../../BlockWars/kits.yml"
  2164. set {_lore} to yaml value "config.kits.%loop-value%.lore" from file "../../BlockWars/kits.yml"
  2165. replace all "//" with "||" in {_lore}
  2166. set {_purchase} to yaml value "config.kits.%loop-value%.purchase" from file "../../BlockWars/kits.yml"
  2167. if {_purchase} is "true":
  2168. if {bw.%{_p}%.kits-purchased::%loop-value%} is not set:
  2169. set {_name} to "&c%{_name}%"
  2170. else:
  2171. set {_name} to "&a%{_name}%"
  2172. else:
  2173. set {_name} to "&a%{_name}%"
  2174. set {_icon} to yaml value "config.kits.%loop-value%.icon" from file "../../BlockWars/kits.yml"
  2175. set {_icon} to {_icon} parsed as item
  2176. if {_lore} is set:
  2177. 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%""]"
  2178. else:
  2179. 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%""]"
  2180. evaluate {_gui}
  2181. add 1 to {_slot}
  2182. else:
  2183. send "&4Error" to {_p}
  2184. sub "bw-buy-kit":
  2185. set {_p} to parameter 1
  2186. set {_kit} to parameter 2
  2187. set {_purchase} to yaml value "config.kits.%{_kit}%.purchase" from file "../../BlockWars/kits.yml"
  2188. if {_purchase} is "true":
  2189. if {bw.%{_p}%.kits-purchased::%{_kit}%} is not set:
  2190. set {_price} to yaml value "config.kits.%{_kit}%.price" from file "../../BlockWars/kits.yml"
  2191. set {_price} to {_price} parsed as integer
  2192. if balance of {_p} >= {_price}:
  2193. remove {_price} from balance of {_p}
  2194. set {bw.%{_p}%.kits-purchased::%{_kit}%} to true
  2195. set {_kit-msg} to {bw.config-msg::kit::kit-purchased}
  2196. replace all "<kit>" with "%{_kit}%" in {_kit-msg}
  2197. send "%{_kit-msg}%" to {_p}
  2198. else:
  2199. send "&c%{bw.config-msg::error::no-money}%" to {_p}
  2200. else:
  2201. send "&c%{bw.config-msg::kit::kit-already-purchased}%" to {_p}
  2202. sub "bw-select-kit":
  2203. set {_p} to parameter 1
  2204. set {_kit} to parameter 2
  2205. set {_purchase} to yaml value "config.kits.%{_kit}%.purchase" from file "../../BlockWars/kits.yml"
  2206. if {_purchase} is "true":
  2207. if {bw.%{_p}%.kits-purchased::%{_kit}%} is set:
  2208. if {bw.status.%{bw.%{_p}%.playing-arena}%} is "Waiting" or "Starting":
  2209. set {_kits::*} to yaml nodes "config.kits" from file "../../BlockWars/kits.yml"
  2210. loop {_kits::*}:
  2211. set {_disp::%loop-value%} to loop-value
  2212. if {_disp::%{_kit}%} is set:
  2213. set {bw.%{_p}%.kit} to "%{_kit}%"
  2214. set {_msg.kit} to {bw.config-msg::kit::kit-select-lobby}
  2215. replace all "<kit>" with "%{_kit}%" in {_msg.kit}
  2216. send "%{_msg.kit}%" to {_p}
  2217. else if {bw.status.%{bw.%{_p}%.playing-arena}%} is "Ingame":
  2218. set {_kits::*} to yaml nodes "config.kits" from file "../../BlockWars/kits.yml"
  2219. loop {_kits::*}:
  2220. set {_disp::%loop-value%} to loop-value
  2221. if {_disp::%{_kit}%} is set:
  2222. set {bw.%{_p}%.kit} to "%{_kit}%"
  2223. set {_msg.kit} to {bw.config-msg::kit::kit-select-ingame}
  2224. replace all "<kit>" with "%{_kit}%" in {_msg.kit}
  2225. send "%{_msg.kit}%" to {_p}
  2226. else:
  2227. send "&c%{bw.config-msg::error::kit-not-bought}%" to {_p}
  2228. else:
  2229. if {bw.status.%{bw.%{_p}%.playing-arena}%} is "Waiting" or "Starting":
  2230. set {_kits::*} to yaml nodes "config.kits" from file "../../BlockWars/kits.yml"
  2231. loop {_kits::*}:
  2232. set {_disp::%loop-value%} to loop-value
  2233. if {_disp::%{_kit}%} is set:
  2234. set {bw.%{_p}%.kit} to "%{_kit}%"
  2235. set {_msg.kit} to {bw.config-msg::kit::kit-select-lobby}
  2236. replace all "<kit>" with "%{_kit}%" in {_msg.kit}
  2237. send "%{_msg.kit}%" to {_p}
  2238. else if {bw.status.%{bw.%{_p}%.playing-arena}%} is "Ingame":
  2239. set {_kits::*} to yaml nodes "config.kits" from file "../../BlockWars/kits.yml"
  2240. loop {_kits::*}:
  2241. set {_disp::%loop-value%} to loop-value
  2242. if {_disp::%{_kit}%} is set:
  2243. set {bw.%{_p}%.kit} to "%{_kit}%"
  2244. set {_msg.kit} to {bw.config-msg::kit::kit-select-ingame}
  2245. replace all "<kit>" with "%{_kit}%" in {_msg.kit}
  2246. send "%{_msg.kit}%" to {_p}
  2247. sub "bw-give-kits":
  2248. set {_p} to parameter 1
  2249. remove speed from {_p}
  2250. remove jump boost from {_p}
  2251. set {_kit} to parameter 2
  2252. if {bw.%{_p}%.kit} is set:
  2253. set {_kits::*} to yaml nodes "config.kits" from file "../../BlockWars/kits.yml"
  2254. loop {_kits::*}:
  2255. set {_disp::%loop-value%} to loop-value
  2256. if {_disp::%{_kit}%} is set:
  2257. clear {_p}'s inventory
  2258. set {_helmet} to yaml value "config.kits.%{_kit}%.armour.helmet" from file "../../BlockWars/kits.yml"
  2259. set {_helmet} to {_helmet} parsed as item
  2260. set {_chestplate} to yaml value "config.kits.%{_kit}%.armour.chestplate" from file "../../BlockWars/kits.yml"
  2261. set {_chestplate} to {_chestplate} parsed as item
  2262. set {_leggings} to yaml value "config.kits.%{_kit}%.armour.leggings" from file "../../BlockWars/kits.yml"
  2263. set {_leggings} to {_leggings} parsed as item
  2264. set {_boots} to yaml value "config.kits.%{_kit}%.armour.boots" from file "../../BlockWars/kits.yml"
  2265. set {_boots} to {_boots} parsed as item
  2266. set {_items::*} to yaml nodes "config.kits.%{_kit}%.items" from file "../../BlockWars/kits.yml"
  2267. set helmet of {_p} to {_helmet}
  2268. set chestplate of {_p} to {_chestplate}
  2269. set leggings of {_p} to {_leggings}
  2270. set boots of {_p} to {_boots}
  2271. loop {_items::*}:
  2272. set {_i} to loop-value parsed as item
  2273. give {_i} to {_p}
  2274. else:
  2275. clear {_p}'s inventory
  2276. equip {_p} with all leather armour
  2277. give a stone sword to {_p}
  2278. give a bow to {_p}
  2279. give a wood pickaxe to {_p}
  2280. give 3 arrow to {_p}
  2281. else:
  2282. clear {_p}'s inventory
  2283. equip {_p} with all leather armour
  2284. give a stone sword to {_p}
  2285. give a bow to {_p}
  2286. give a wood pickaxe to {_p}
  2287. give 3 arrow to {_p}
  2288. sub "bw-endgame":
  2289. set {_player} to parameter 1
  2290. set {bw.%{_player}%.no-damage} to true
  2291. clear {_player}'s inventory
  2292. wipe {_player}'s sidebar
  2293. set gamemode of {_player} to survival
  2294. sub "bw-lobbyscoreboard":
  2295. set {_p} to parameter 1
  2296. set {_arena} to {bw.%{_p}%.playing-arena}
  2297. set {_amount} to size of {bw.players.%{_arena}%::*}
  2298. set {_max} to {bw.playerperteam.%{_arena}%}*2
  2299. wipe {_p}'s sidebar
  2300. set {_n} to size of {bw.config::scoreboard-lobby::lines::*}
  2301. set name of sidebar of {_p} to "%{bw.config::scoreboard-lobby::title}%"
  2302. loop {bw.config::scoreboard-lobby::lines::*}:
  2303. set {_sb.line} to "%loop-value%"
  2304. set {_colors::*} to integers from 0 to 9, "a", "b", "c", "d", "e", "f", "o", "r", "k" and "l"
  2305. set {_espacios::*} to " ", " ", " ", " " and " "
  2306. 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}
  2307. replace all "<arena>" with "%{_arena}%" in {_sb.line}
  2308. replace all "<amount>" with "%{_amount}%" in {_sb.line}
  2309. replace all "<max>" with "%{_max}%" in {_sb.line}
  2310. set score "%coloured {_sb.line}%" in sidebar of {_p} to {_n}
  2311. remove 1 from {_n}
  2312. sub "bw-ingamescoreboard":
  2313. set {_p} to parameter 1
  2314. set {_arena} to {bw.%{_p}%.playing-arena}
  2315. set {_amount} to size of {bw.players.%{_arena}%::*}
  2316. set {_max} to {bw.playerperteam.%{_arena}%}*2
  2317. set {_fase} to {bw.phase.%{_arena}%}
  2318. if {_fase} is "build":
  2319. set {_fase} to "%{bw.config-msg::phase::phase-build}%"
  2320. else if {_fase} is "figth":
  2321. set {_fase} to "%{bw.config-msg::phase::phase-figth}%"
  2322. else if {_fase} is "overtime":
  2323. set {_fase} to "%{bw.config-msg::phase::phase-overtime}%"
  2324. set {_time} to "%{bw.time.%{_arena}%}%" parsed as text
  2325. replace all "and" with "" in {_time}
  2326. replace all "seconds" and "second" with "s" in {_time}
  2327. replace all "minutes" and "minute" with "m" in {_time}
  2328. replace all " " with "" in {_time}
  2329. replace all "m" with ":" in {_time}
  2330. replace all "s" with "" in {_time}
  2331. set {_time::*} to {_time} split at ":"
  2332. if {_time} is "1:":
  2333. set {_Tiempo} to "01:00"
  2334. else if {_time} is "2:":
  2335. set {_Tiempo} to "02:00"
  2336. else if {_time} is "3:":
  2337. set {_Tiempo} to "03:00"
  2338. else if {_time} is "4:":
  2339. set {_Tiempo} to "04:00"
  2340. else if {_time} is "5:":
  2341. set {_Tiempo} to "05:00"
  2342. else if {_time} is "6:":
  2343. set {_Tiempo} to "06:00"
  2344. else if {_time} is "7:":
  2345. set {_Tiempo} to "07:00"
  2346. else if {_time} is "8:":
  2347. set {_Tiempo} to "08:00"
  2348. else if {_time} is "9:":
  2349. set {_Tiempo} to "09:00"
  2350. else:
  2351. if size of {_time::*} is 2:
  2352. set {_seg} to {_time::2}
  2353. if {_seg} is "1":
  2354. set {_seg} to "01"
  2355. if {_seg} is "2":
  2356. set {_seg} to "02"
  2357. if {_seg} is "3":
  2358. set {_seg} to "03"
  2359. if {_seg} is "4":
  2360. set {_seg} to "04"
  2361. if {_seg} is "5":
  2362. set {_seg} to "05"
  2363. if {_seg} is "6":
  2364. set {_seg} to "06"
  2365. if {_seg} is "7":
  2366. set {_seg} to "07"
  2367. if {_seg} is "8":
  2368. set {_seg} to "08"
  2369. if {_seg} is "9":
  2370. set {_seg} to "09"
  2371. set {_Tiempo} to "0%{_time::1}%:%{_seg}%"
  2372. else if size of {_time::*} is 1:
  2373. set {_seg} to {_time::1}
  2374. if {_seg} is "1":
  2375. set {_seg} to "01"
  2376. if {_seg} is "2":
  2377. set {_seg} to "02"
  2378. if {_seg} is "3":
  2379. set {_seg} to "03"
  2380. if {_seg} is "4":
  2381. set {_seg} to "04"
  2382. if {_seg} is "5":
  2383. set {_seg} to "05"
  2384. if {_seg} is "6":
  2385. set {_seg} to "06"
  2386. if {_seg} is "7":
  2387. set {_seg} to "07"
  2388. if {_seg} is "8":
  2389. set {_seg} to "08"
  2390. if {_seg} is "9":
  2391. set {_seg} to "09"
  2392. set {_Tiempo} to "00:%{_seg}%"
  2393. set {_pt.red} to {bw.redpoints.%{_arena}%}
  2394. set {_pt.blue} to {bw.bluepoints.%{_arena}%}
  2395. wipe {_p}'s sidebar
  2396. set {_n} to size of {bw.config::scoreboard-ingame::lines::*}
  2397. set name of sidebar of {_p} to "%{bw.config::scoreboard-ingame::title}%"
  2398. loop {bw.config::scoreboard-ingame::lines::*}:
  2399. set {_sb.line} to "%loop-value%"
  2400. set {_colors::*} to integers from 0 to 9, "a", "b", "c", "d", "e", "f", "o", "r", "k" and "l"
  2401. set {_espacios::*} to " ", " ", " ", " " and " "
  2402. 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}
  2403. replace all "<arena>" with "%{_arena}%" in {_sb.line}
  2404. replace all "<amount>" with "%{_amount}%" in {_sb.line}
  2405. replace all "<max>" with "%{_max}%" in {_sb.line}
  2406. replace all "<phase>" with "%{_fase}%" in {_sb.line}
  2407. replace all "<time>" with "%{_Tiempo}%" in {_sb.line}
  2408. replace all "<blue-flag-captured>" with "%{_pt.blue}%" in {_sb.line}
  2409. replace all "<red-flag-captured>" with "%{_pt.red}%" in {_sb.line}
  2410. set score "%coloured {_sb.line}%" in sidebar of {_p} to {_n}
  2411. remove 1 from {_n}
  2412. sub "bw-files-reload":
  2413. set {_sender} to parameter 1
  2414. send "&7Reloading files..." to {_sender}
  2415. if existence of "plugins/BlockWars/version.txt" is false:
  2416. wait 3 ticks
  2417. create file "plugins/BlockWars/version.txt"
  2418. wf "## Do not change!!" to "plugins/BlockWars/version.txt"
  2419. wf "version: {@VersionID}" to "plugins/BlockWars/version.txt"
  2420. else:
  2421. set {_ver} to text from "http://pastebin.com/raw/7B4aA8fD"
  2422. if {_ver} is set:
  2423. set {_actual} to yaml value "version" from file "../../BlockWars/version.txt"
  2424. if {_ver} is not {_actual}:
  2425. delete file "plugins/BlockWars/config.yml"
  2426. delete file "plugins/BlockWars/message.yml"
  2427. delete file "plugins/BlockWars/sign.yml"
  2428. delete file "plugins/BlockWars/kits.yml"
  2429. delete file "plugins/BlockWars/rewards.yml"
  2430. delete file "plugins/BlockWars/scoreboard.yml"
  2431. delete file "plugins/BlockWars/version.txt"
  2432. send "%{bw.config::prefix}% &aAll config files has bee updated! If no files generated use /blockwars reload." to console
  2433. send "%{bw.config::prefix}% &aAll config files has bee updated! If no files generated use /blockwars reload." to all ops
  2434. else:
  2435. send "%{bw.config::prefix}% &cIt not has been possible to connect to internet!" to console
  2436. send "%{bw.config::prefix}% &cIt not has been possible to connect to internet!" to all ops
  2437. if existence of "plugins/BlockWars/config.yml" is false:
  2438. send "%{bw.config::prefix}% &2File config.yml create!" to {_sender}
  2439. create file "plugins/BlockWars/config.yml"
  2440. wf "## Block Wars MINIGAME - Configuration ##" to "plugins/BlockWars/config.yml"
  2441. set yaml value "config.prefix" from file "../../BlockWars/config.yml" to "&7[&2BlockWars&7]"
  2442. set yaml value "config.rebuild-map-delay" from file "../../BlockWars/config.yml" to "3 seconds"
  2443. set yaml value "config.regeneration-effect" from file "../../BlockWars/config.yml" to "true"
  2444. 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>"
  2445. set yaml value "config.defaults.default_min_players" from file "../../BlockWars/config.yml" to "4"
  2446. set yaml value "config.defaults.default_players_per_team" from file "../../BlockWars/config.yml" to "6"
  2447. set yaml value "config.commands.leave" from file "../../BlockWars/config.yml" to "leave"
  2448. set yaml value "config.countdown.lobby" from file "../../BlockWars/config.yml" to "20"
  2449. set yaml value "config.chat.lobby" from file "../../BlockWars/config.yml" to "&7<player>: <msg>"
  2450. set yaml value "config.chat.team" from file "../../BlockWars/config.yml" to "&b[Team] &e<player>&f: &7<msg>"
  2451. set yaml value "config.chat.global" from file "../../BlockWars/config.yml" to "&4[Global] &e<player>&f: &7<msg>"
  2452. set yaml value "config.kits.title" from file "../../BlockWars/config.yml" to "&8Kit Selection"
  2453. set yaml value "config.kits.villager-name" from file "../../BlockWars/config.yml" to "&aKits"
  2454. set yaml value "config.shop.title" from file "../../BlockWars/config.yml" to "&0BlockWars Shop"
  2455. set yaml value "config.items.kits.id" from file "../../BlockWars/config.yml" to "339:0"
  2456. set yaml value "config.items.kits.name" from file "../../BlockWars/config.yml" to "&aKit Selection"
  2457. set yaml value "config.items.kits.slot" from file "../../BlockWars/config.yml" to "1"
  2458. set yaml value "config.items.select-team.id" from file "../../BlockWars/config.yml" to "399:0"
  2459. set yaml value "config.items.select-team.name" from file "../../BlockWars/config.yml" to "&aTeam Selection"
  2460. set yaml value "config.items.select-team.slot" from file "../../BlockWars/config.yml" to "0"
  2461. set yaml value "config.items.leave.id" from file "../../BlockWars/config.yml" to "331:0"
  2462. set yaml value "config.items.leave.name" from file "../../BlockWars/config.yml" to "&cLeave the game"
  2463. set yaml value "config.items.leave.slot" from file "../../BlockWars/config.yml" to "8"
  2464. set {bw.config::prefix} to yaml value "config.prefix" from file "../../BlockWars/config.yml"
  2465. set {bw.config::rebuild-map-delay} to yaml value "config.rebuild-map-delay" from file "../../BlockWars/config.yml"
  2466. set {bw.config::rebuild-map-delay} to {bw.config::rebuild-map-delay} parsed as timespan
  2467. set {bw.config::config::regeneration-effect} to yaml value "config.regeneration-effect" from file "../../BlockWars/config.yml"
  2468. set {bw.config::hologram::stats-holo} to yaml value "config.holo-stats" from file "../../BlockWars/config.yml"
  2469. set {bw.config::config::default_min_players} to yaml value "config.defaults.default_min_players" from file "../../BlockWars/config.yml"
  2470. set {bw.config::config::default_min_players} to {bw.config::config::default_min_players} parsed as integer
  2471. set {bw.config::config::default_players_per_team} to yaml value "config.defaults.default_players_per_team" from file "../../BlockWars/config.yml"
  2472. set {bw.config::config::default_players_per_team} to {bw.config::config::default_players_per_team} parsed as integer
  2473. set {bw.config::leave-cmd} to yaml value "config.commands.leave" from file "../../BlockWars/config.yml"
  2474. set {bw.config::config::countdown} to yaml value "config.countdown.lobby" from file "../../BlockWars/config.yml"
  2475. set {bw.config::config::countdown} to {bw.config::config::countdown} parsed as integer
  2476. set {bw.config::chat::lobby-chat} to yaml value "config.chat.lobby" from file "../../BlockWars/config.yml"
  2477. set {bw.config::chat::team-chat} to yaml value "config.chat.team" from file "../../BlockWars/config.yml"
  2478. set {bw.config::chat::global-chat} to yaml value "config.chat.global" from file "../../BlockWars/config.yml"
  2479. set {bw.config::kit::title-gui} to yaml value "config.kits.title" from file "../../BlockWars/config.yml"
  2480. set {bw.config::kit::villager-name} to yaml value "config.kits.villager-name" from file "../../BlockWars/config.yml"
  2481. set {bw.config::shop::shop-title-gui} to yaml value "config.shop.title" from file "../../BlockWars/config.yml"
  2482. set {bw.config::item::kit-item-id} to yaml value "config.items.kits.id" from file "../../BlockWars/config.yml"
  2483. set {bw.config::item::kit-item-id} to {bw.config::item::kit-item-id} parsed as item
  2484. set {bw.config::item::kit-item-name} to yaml value "config.items.kits.name" from file "../../BlockWars/config.yml"
  2485. set {bw.config::item::kit-item-slot} to yaml value "config.items.kits.slot" from file "../../BlockWars/config.yml"
  2486. set {bw.config::item::kit-item-slot} to {bw.config::item::kit-item-slot} parsed as integer
  2487. set {bw.config::item::team-item-id} to yaml value "config.items.select-team.id" from file "../../BlockWars/config.yml"
  2488. set {bw.config::item::team-item-id} to {bw.config::item::team-item-id} parsed as item
  2489. set {bw.config::item::team-item-name} to yaml value "config.items.select-team.name" from file "../../BlockWars/config.yml"
  2490. set {bw.config::item::team-item-slot} to yaml value "config.items.select-team.slot" from file "../../BlockWars/config.yml"
  2491. set {bw.config::item::team-item-slot} to {bw.config::item::team-item-slot} parsed as integer
  2492. set {bw.config::item::leave-item-id} to yaml value "config.items.leave.id" from file "../../BlockWars/config.yml"
  2493. set {bw.config::item::leave-item-id} to {bw.config::item::leave-item-id} parsed as item
  2494. set {bw.config::item::leave-item-name} to yaml value "config.items.leave.name" from file "../../BlockWars/config.yml"
  2495. set {bw.config::item::leave-item-slot} to yaml value "config.items.leave.slot" from file "../../BlockWars/config.yml"
  2496. set {bw.config::item::leave-item-slot} to {bw.config::item::leave-item-slot} parsed as integer
  2497. if existence of "plugins/BlockWars/messages.yml" is false:
  2498. send "%{bw.config::prefix}% &2File messages.yml create!" to {_sender}
  2499. create file "plugins/BlockWars/messages.yml"
  2500. wf "## Block Wars MINIGAME - Messages ##" to "plugins/BlockWars/messages.yml"
  2501. set yaml value "messages.error.no-permission" from file "../../BlockWars/messages.yml" to "&cYou do not have permission to do this!"
  2502. set yaml value "messages.error.kit-no-permission" from file "../../BlockWars/messages.yml" to "&cYou do not have permission to select this kit!"
  2503. set yaml value "messages.error.kit-not-bought" from file "../../BlockWars/messages.yml" to "&cYou have not bought this kit!"
  2504. set yaml value "messages.error.no-money" from file "../../BlockWars/messages.yml" to "&cYou do not have enough money!"
  2505. set yaml value "messages.error.no-ingame" from file "../../BlockWars/messages.yml" to "&cYou are not a game!"
  2506. set yaml value "messages.error.ingame" from file "../../BlockWars/messages.yml" to "&cYou are in a game!"
  2507. set yaml value "messages.error.full-game" from file "../../BlockWars/messages.yml" to "&cThis game is in progress!"
  2508. set yaml value "messages.error.not-available" from file "../../BlockWars/messages.yml" to "&cThis game is not available!"
  2509. set yaml value "messages.error.not-exist" from file "../../BlockWars/messages.yml" to "&cThis game does not exist!"
  2510. set yaml value "messages.error.stop-arena" from file "../../BlockWars/messages.yml" to "&cThis play has been stopped!"
  2511. 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!"
  2512. set yaml value "messages.error.no-build" from file "../../BlockWars/messages.yml" to "&cYou cannot build here!"
  2513. set yaml value "messages.error.no-break" from file "../../BlockWars/messages.yml" to "&cYou can only break the blocks placed!"
  2514. set yaml value "messages.error.capture-own-flag" from file "../../BlockWars/messages.yml" to "&cYou can not take the flag of your team!"
  2515. set yaml value "messages.error.damage-own-team" from file "../../BlockWars/messages.yml" to "&cYou can not attack your own team!"
  2516. set yaml value "messages.error.full-team" from file "../../BlockWars/messages.yml" to "&cYou cannot join this team because it is full!"
  2517. set yaml value "messages.listener.join-broad" from file "../../BlockWars/messages.yml" to "&5<player> joined the game. <amount>/<max>"
  2518. set yaml value "messages.listener.leave-broad-lobby" from file "../../BlockWars/messages.yml" to "&6<player> left the game. <amount>/<max>"
  2519. set yaml value "messages.listener.leave-broad-ingame" from file "../../BlockWars/messages.yml" to "&6<player> &eleft the game!"
  2520. set yaml value "messages.listener.leave-msg" from file "../../BlockWars/messages.yml" to "&fYou have abandoned the game!"
  2521. set yaml value "messages.phase.phase-build" from file "../../BlockWars/messages.yml" to "&a&lBUILD"
  2522. set yaml value "messages.phase.phase-fight" from file "../../BlockWars/messages.yml" to "&c&lFIGTH"
  2523. set yaml value "messages.phase.phase-overtime" from file "../../BlockWars/messages.yml" to "&4&lOVERTIME"
  2524. set yaml value "messages.game.countdown-msg" from file "../../BlockWars/messages.yml" to "&9The game starting in <time> seconds!"
  2525. set yaml value "messages.game.toStart" from file "../../BlockWars/messages.yml" to "&6Game will start!"
  2526. set yaml value "messages.game.jointeam-red" from file "../../BlockWars/messages.yml" to "&aJoined team &cRed&a!"
  2527. set yaml value "messages.game.jointeam-blue" from file "../../BlockWars/messages.yml" to "&aJoined team &9Blue&a!"
  2528. set yaml value "messages.game.phasestart-build" from file "../../BlockWars/messages.yml" to "&6Build blocks around your flag!"
  2529. set yaml value "messages.game.phasestart-fight" from file "../../BlockWars/messages.yml" to "&6Capture de other teams flags!"
  2530. 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."
  2531. set yaml value "messages.game.flag-taken" from file "../../BlockWars/messages.yml" to "FLAG TAKEN//<player> &7has taken the <team> &7flag!"
  2532. set yaml value "messages.game.flag-dropped" from file "../../BlockWars/messages.yml" to "FLAG DROPPED//<player> &7has dropped the <team> &7flag!"
  2533. set yaml value "messages.game.flag-captured" from file "../../BlockWars/messages.yml" to "FLAG CAPTURED//<player> &7has captured the <team> &7flag!"
  2534. set yaml value "messages.pvp.kill-player" from file "../../BlockWars/messages.yml" to "<victim> &ewas killed by <attacker>&e!"
  2535. set yaml value "messages.pvp.death-player" from file "../../BlockWars/messages.yml" to "<victim> &edied!"
  2536. set yaml value "messages.pvp.respawn-screen" from file "../../BlockWars/messages.yml" to "&eRespawning in &6<time> &eseconds"
  2537. set yaml value "messages.kit.kit-purchased" from file "../../BlockWars/messages.yml" to "&aPurchased <kit>!"
  2538. set yaml value "messages.kit.kit-already-purchased" from file "../../BlockWars/messages.yml" to "&cYou have already purchased this kit!"
  2539. set yaml value "messages.kit.kit-select-lobby" from file "../../BlockWars/messages.yml" to "&aYou have selected the kit <kit>!"
  2540. set yaml value "messages.kit.kit-select-ingame" from file "../../BlockWars/messages.yml" to "&6Your kit will be delivered to respawn!"
  2541. set yaml value "messages.win.red-win" from file "../../BlockWars/messages.yml" to "&cRed team &awon the game!"
  2542. set yaml value "messages.win.blue-win" from file "../../BlockWars/messages.yml" to "&9Blue team &awon the game!"
  2543. set yaml value "messages.win.tie-win" from file "../../BlockWars/messages.yml" to "&aThe game has ended in a tie!"
  2544. set {bw.config-msg::kit::kit-purchased} to yaml value "messages.kit.kit-purchased" from file "../../BlockWars/messages.yml"
  2545. set {bw.config-msg::kit::kit-already-purchased} to yaml value "messages.kit.kit-already-purchased" from file "../../BlockWars/messages.yml"
  2546. set {bw.config-msg::kit::kit-select-lobby} to yaml value "messages.kit.kit-select-lobby" from file "../../BlockWars/messages.yml"
  2547. set {bw.config-msg::kit::kit-select-ingame} to yaml value "messages.kit.kit-select-ingame" from file "../../BlockWars/messages.yml"
  2548. set {bw.config-msg::win::red-win} to yaml value "messages.win.red-win" from file "../../BlockWars/messages.yml"
  2549. set {bw.config-msg::win::blue-win} to yaml value "messages.win.blue-win" from file "../../BlockWars/messages.yml"
  2550. set {bw.config-msg::win::tie-game} to yaml value "messages.win.tie-win" from file "../../BlockWars/messages.yml"
  2551. set {bw.config-msg::pvp::kill-player} to yaml value "messages.pvp.kill-player" from file "../../BlockWars/messages.yml"
  2552. set {bw.config-msg::pvp::death-player} to yaml value "messages.pvp.death-player" from file "../../BlockWars/messages.yml"
  2553. set {bw.config-msg::pvp::respawn-screen} to yaml value "messages.pvp.respawn-screen" from file "../../BlockWars/messages.yml"
  2554. set {bw.config-msg::phase::phase-build} to yaml value "messages.phase.phase-build" from file "../../BlockWars/messages.yml"
  2555. set {bw.config-msg::phase::phase-figth} to yaml value "messages.phase.phase-fight" from file "../../BlockWars/messages.yml"
  2556. set {bw.config-msg::phase::phase-overtime} to yaml value "messages.phase.phase-overtime" from file "../../BlockWars/messages.yml"
  2557. set {bw.config-msg::game::countdown-msg} to yaml value "messages.game.countdown-msg" from file "../../BlockWars/messages.yml"
  2558. set {bw.config-msg::game::tostart} to yaml value "messages.game.toStart" from file "../../BlockWars/messages.yml"
  2559. set {bw.config-msg::game::jointeam-red} to yaml value "messages.game.jointeam-red" from file "../../BlockWars/messages.yml"
  2560. set {bw.config-msg::game::jointeam-blue} to yaml value "messages.game.jointeam-blue" from file "../../BlockWars/messages.yml"
  2561. set {bw.config-msg::game::phasestart-build} to yaml value "messages.game.phasestart-build" from file "../../BlockWars/messages.yml"
  2562. set {bw.config-msg::game::phasestart-figth} to yaml value "messages.game.phasestart-fight" from file "../../BlockWars/messages.yml"
  2563. set {bw.config-msg::game::phasestart-overtime} to yaml value "messages.game.phasestart-overtime" from file "../../BlockWars/messages.yml"
  2564. set {bw.config-msg::game::flag-taken} to yaml value "messages.game.flag-taken" from file "../../BlockWars/messages.yml"
  2565. set {bw.config-msg::game::flag-dropped} to yaml value "messages.game.flag-dropped" from file "../../BlockWars/messages.yml"
  2566. set {bw.config-msg::game::flag-captured} to yaml value "messages.game.flag-captured" from file "../../BlockWars/messages.yml"
  2567. set {bw.config-msg::listener::join-broad} to yaml value "messages.listener.join-broad" from file "../../BlockWars/messages.yml"
  2568. set {bw.config-msg::listener::leave-broad-lobby} to yaml value "messages.listener.leave-broad-lobby" from file "../../BlockWars/messages.yml"
  2569. set {bw.config-msg::listener::leave-broad-ingame} to yaml value "messages.listener.leave-broad-ingame" from file "../../BlockWars/messages.yml"
  2570. set {bw.config-msg::listener::leave-msg} to yaml value "messages.listener.leave-msg" from file "../../BlockWars/messages.yml"
  2571. set {bw.config-msg::error::no-permission} to yaml value "messages.error.no-permission" from file "../../BlockWars/messages.yml"
  2572. set {bw.config-msg::error::kit-no-permission} to yaml value "messages.error.kit-no-permission" from file "../../BlockWars/messages.yml"
  2573. set {bw.config-msg::error::no-ingame} to yaml value "messages.error.no-ingame" from file "../../BlockWars/messages.yml"
  2574. set {bw.config-msg::error::ingame} to yaml value "messages.error.ingame" from file "../../BlockWars/messages.yml"
  2575. set {bw.config-msg::error::full-game} to yaml value "messages.error.full-game" from file "../../BlockWars/messages.yml"
  2576. set {bw.config-msg::error::not-available} to yaml value "messages.error.not-available" from file "../../BlockWars/messages.yml"
  2577. set {bw.config-msg::error::not-exist} to yaml value "messages.error.not-exist" from file "../../BlockWars/messages.yml"
  2578. set {bw.config-msg::error::stop-arena} to yaml value "messages.error.stop-arena" from file "../../BlockWars/messages.yml"
  2579. set {bw.config-msg::error::no-min-players} to yaml value "messages.error.no-min-players" from file "../../BlockWars/messages.yml"
  2580. set {bw.config-msg::error::no-build} to yaml value "messages.error.no-build" from file "../../BlockWars/messages.yml"
  2581. set {bw.config-msg::error::no-break} to yaml value "messages.error.no-break" from file "../../BlockWars/messages.yml"
  2582. set {bw.config-msg::error::kit-not-bought} to yaml value "messages.error.kit-not-bought" from file "../../BlockWars/messages.yml"
  2583. set {bw.config-msg::error::no-money} to yaml value "messages.error.no-money" from file "../../BlockWars/messages.yml"
  2584. set {bw.config-msg::error::capture-own-flag} to yaml value "messages.error.capture-own-flag" from file "../../BlockWars/messages.yml"
  2585. set {bw.config-msg::error::damage-own-team} to yaml value "messages.error.damage-own-team" from file "../../BlockWars/messages.yml"
  2586. set {bw.config-msg::error::full-team} to yaml value "messages.error.full-team" from file "../../BlockWars/messages.yml"
  2587. if existence of "plugins/BlockWars/sign.yml" is false:
  2588. send "%{bw.config::prefix}% &2File sign.yml create!" to {_sender}
  2589. create file "plugins/BlockWars/sign.yml"
  2590. wf "## BlockWars MINIGAME - Sign ##" to "plugins/BlockWars/sign.yml"
  2591. set yaml value "sign.lines.header" from file "../../BlockWars/sign.yml" to "&0&lBlockWars"
  2592. set yaml value "sign.status.waiting" from file "../../BlockWars/sign.yml" to "&aWaiting"
  2593. set yaml value "sign.status.starting" from file "../../BlockWars/sign.yml" to "&6Starting"
  2594. set yaml value "sign.status.ingame" from file "../../BlockWars/sign.yml" to "&cIngame"
  2595. set yaml value "sign.status.rebuild" from file "../../BlockWars/sign.yml" to "&5Rebuild"
  2596. set yaml value "sign.status.notready" from file "../../BlockWars/sign.yml" to "&4NotReady"
  2597. set yaml value "sign.block-change.enable" from file "../../BlockWars/sign.yml" to "true"
  2598. set yaml value "sign.block-change.blocks.waiting" from file "../../BlockWars/sign.yml" to "95:5"
  2599. set yaml value "sign.block-change.blocks.starting" from file "../../BlockWars/sign.yml" to "95:4"
  2600. set yaml value "sign.block-change.blocks.ingame" from file "../../BlockWars/sign.yml" to "95:14"
  2601. set yaml value "sign.block-change.blocks.rebuild" from file "../../BlockWars/sign.yml" to "95:10"
  2602. set yaml value "sign.block-change.blocks.notready" from file "../../BlockWars/sign.yml" to "95:15"
  2603. set {bw.config::sign::header} to yaml value "sign.lines.header" from file "../../BlockWars/sign.yml"
  2604. set {bw.config::sign::waiting} to yaml value "sign.status.waiting" from file "../../BlockWars/sign.yml"
  2605. set {bw.config::sign::starting} to yaml value "sign.status.starting" from file "../../BlockWars/sign.yml"
  2606. set {bw.config::sign::gingame} to yaml value "sign.status.ingame" from file "../../BlockWars/sign.yml"
  2607. set {bw.config::sign::rebuild} to yaml value "sign.status.rebuild" from file "../../BlockWars/sign.yml"
  2608. set {bw.config::sign::notready} to yaml value "sign.status.notready" from file "../../BlockWars/sign.yml"
  2609. set {bw.config::sign-block.enable} to yaml value "sign.block-change.enable" from file "../../BlockWars/sign.yml"
  2610. set {bw.config::sign-block.waiting} to yaml value "sign.block-change.blocks.waiting" from file "../../BlockWars/sign.yml"
  2611. set {bw.config::sign-block.starting} to yaml value "sign.block-change.blocks.starting" from file "../../BlockWars/sign.yml"
  2612. set {bw.config::sign-block.gingame} to yaml value "sign.block-change.blocks.ingame" from file "../../BlockWars/sign.yml"
  2613. set {bw.config::sign-block.rebuild} to yaml value "sign.block-change.blocks.rebuild" from file "../../BlockWars/sign.yml"
  2614. set {bw.config::sign-block.notready} to yaml value "sign.block-change.blocks.notready" from file "../../BlockWars/sign.yml"
  2615. if existence of "plugins/BlockWars/kits.yml" is false:
  2616. send "%{bw.config::prefix}% &2File kits.yml create!" to {_sender}
  2617. create file "plugins/BlockWars/kits.yml"
  2618. set yaml value "config.kits.warrior.name" from file "../../BlockWars/kits.yml" to "Warrior"
  2619. 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"
  2620. set yaml value "config.kits.warrior.icon" from file "../../BlockWars/kits.yml" to "1 272:0"
  2621. set yaml value "config.kits.warrior.purchase" from file "../../BlockWars/kits.yml" to "false"
  2622. set yaml value "config.kits.warrior.price" from file "../../BlockWars/kits.yml" to "0"
  2623. set yaml value "config.kits.warrior.armour.helmet" from file "../../BlockWars/kits.yml" to "0:0"
  2624. set yaml value "config.kits.warrior.armour.chestplate" from file "../../BlockWars/kits.yml" to "299:0"
  2625. set yaml value "config.kits.warrior.armour.leggings" from file "../../BlockWars/kits.yml" to "300:0"
  2626. set yaml value "config.kits.warrior.armour.boots" from file "../../BlockWars/kits.yml" to "0:0"
  2627. set yaml value "config.kits.warrior.items.1 272:0" from file "../../BlockWars/kits.yml" to ""
  2628. set yaml value "config.kits.warrior.items.1 270:0" from file "../../BlockWars/kits.yml" to ""
  2629. set yaml value "config.kits.warrior.items.1 261:0" from file "../../BlockWars/kits.yml" to ""
  2630. set yaml value "config.kits.warrior.items.3 262:0" from file "../../BlockWars/kits.yml" to ""
  2631. set yaml value "config.kits.archer.name" from file "../../BlockWars/kits.yml" to "Archer"
  2632. 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"
  2633. set yaml value "config.kits.archer.icon" from file "../../BlockWars/kits.yml" to "1 261:0"
  2634. set yaml value "config.kits.archer.purchase" from file "../../BlockWars/kits.yml" to "false"
  2635. set yaml value "config.kits.archer.price" from file "../../BlockWars/kits.yml" to "0"
  2636. set yaml value "config.kits.archer.armour.helmet" from file "../../BlockWars/kits.yml" to "0:0"
  2637. set yaml value "config.kits.archer.armour.chestplate" from file "../../BlockWars/kits.yml" to "303:0"
  2638. set yaml value "config.kits.archer.armour.leggings" from file "../../BlockWars/kits.yml" to "0:0"
  2639. set yaml value "config.kits.archer.armour.boots" from file "../../BlockWars/kits.yml" to "0:0"
  2640. set yaml value "config.kits.archer.items.1 blaze rod of knockback 2" from file "../../BlockWars/kits.yml" to ""
  2641. set yaml value "config.kits.archer.items.1 270:0" from file "../../BlockWars/kits.yml" to ""
  2642. set yaml value "config.kits.archer.items.1 261:0" from file "../../BlockWars/kits.yml" to ""
  2643. set yaml value "config.kits.archer.items.20 262:0" from file "../../BlockWars/kits.yml" to ""
  2644. set yaml value "config.kits.runner.name" from file "../../BlockWars/kits.yml" to "Runner"
  2645. 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"
  2646. set yaml value "config.kits.runner.icon" from file "../../BlockWars/kits.yml" to "1 373:8194"
  2647. set yaml value "config.kits.runner.purchase" from file "../../BlockWars/kits.yml" to "false"
  2648. set yaml value "config.kits.runner.price" from file "../../BlockWars/kits.yml" to "0"
  2649. set yaml value "config.kits.runner.armour.helmet" from file "../../BlockWars/kits.yml" to "0:0"
  2650. set yaml value "config.kits.runner.armour.chestplate" from file "../../BlockWars/kits.yml" to "299:0"
  2651. set yaml value "config.kits.runner.armour.leggings" from file "../../BlockWars/kits.yml" to "300:0"
  2652. set yaml value "config.kits.runner.armour.boots" from file "../../BlockWars/kits.yml" to "0:0"
  2653. set yaml value "config.kits.runner.items.1 268:0" from file "../../BlockWars/kits.yml" to ""
  2654. set yaml value "config.kits.runner.items.1 270:0" from file "../../BlockWars/kits.yml" to ""
  2655. set yaml value "config.kits.runner.items.1 373:8194" from file "../../BlockWars/kits.yml" to ""
  2656. set yaml value "config.kits.miner.name" from file "../../BlockWars/kits.yml" to "Miner"
  2657. 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)"
  2658. set yaml value "config.kits.miner.icon" from file "../../BlockWars/kits.yml" to "1 274:0"
  2659. set yaml value "config.kits.miner.purchase" from file "../../BlockWars/kits.yml" to "true"
  2660. set yaml value "config.kits.miner.price" from file "../../BlockWars/kits.yml" to "200"
  2661. set yaml value "config.kits.miner.armour.helmet" from file "../../BlockWars/kits.yml" to "301:0"
  2662. set yaml value "config.kits.miner.armour.chestplate" from file "../../BlockWars/kits.yml" to "299:0"
  2663. set yaml value "config.kits.miner.armour.leggings" from file "../../BlockWars/kits.yml" to "300:0"
  2664. set yaml value "config.kits.miner.armour.boots" from file "../../BlockWars/kits.yml" to "298:0"
  2665. set yaml value "config.kits.miner.items.1 268:0" from file "../../BlockWars/kits.yml" to ""
  2666. set yaml value "config.kits.miner.items.1 274:0" from file "../../BlockWars/kits.yml" to ""
  2667. set yaml value "config.kits.miner.items.1 261:0" from file "../../BlockWars/kits.yml" to ""
  2668. set yaml value "config.kits.miner.items.3 262:0" from file "../../BlockWars/kits.yml" to ""
  2669. set yaml value "config.kits.tank.name" from file "../../BlockWars/kits.yml" to "Tank"
  2670. 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"
  2671. set yaml value "config.kits.tank.icon" from file "../../BlockWars/kits.yml" to "1 307:0"
  2672. set yaml value "config.kits.tank.purchase" from file "../../BlockWars/kits.yml" to "true"
  2673. set yaml value "config.kits.tank.price" from file "../../BlockWars/kits.yml" to "600"
  2674. set yaml value "config.kits.tank.armour.helmet" from file "../../BlockWars/kits.yml" to "0:0"
  2675. set yaml value "config.kits.tank.armour.chestplate" from file "../../BlockWars/kits.yml" to "307:0"
  2676. set yaml value "config.kits.tank.armour.leggings" from file "../../BlockWars/kits.yml" to "308:0"
  2677. set yaml value "config.kits.tank.armour.boots" from file "../../BlockWars/kits.yml" to "0:0"
  2678. set yaml value "config.kits.tank.items.1 270:0" from file "../../BlockWars/kits.yml" to ""
  2679. set yaml value "config.kits.tank.items.1 261:0" from file "../../BlockWars/kits.yml" to ""
  2680. set yaml value "config.kits.tank.items.2 262:0" from file "../../BlockWars/kits.yml" to ""
  2681. set yaml value "config.kits.builder.name" from file "../../BlockWars/kits.yml" to "Builder"
  2682. 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"
  2683. set yaml value "config.kits.builder.icon" from file "../../BlockWars/kits.yml" to "1 159:4"
  2684. set yaml value "config.kits.builder.purchase" from file "../../BlockWars/kits.yml" to "true"
  2685. set yaml value "config.kits.builder.price" from file "../../BlockWars/kits.yml" to "350"
  2686. set yaml value "config.kits.builder.armour.helmet" from file "../../BlockWars/kits.yml" to "0:0"
  2687. set yaml value "config.kits.builder.armour.chestplate" from file "../../BlockWars/kits.yml" to "299:0"
  2688. set yaml value "config.kits.builder.armour.leggings" from file "../../BlockWars/kits.yml" to "0:0"
  2689. set yaml value "config.kits.builder.armour.boots" from file "../../BlockWars/kits.yml" to "0:0"
  2690. set yaml value "config.kits.builder.items.1 268:0" from file "../../BlockWars/kits.yml" to ""
  2691. set yaml value "config.kits.builder.items.1 270:0" from file "../../BlockWars/kits.yml" to ""
  2692. set yaml value "config.kits.builder.items.1 261:0" from file "../../BlockWars/kits.yml" to ""
  2693. set yaml value "config.kits.builder.items.3 262:0" from file "../../BlockWars/kits.yml" to ""
  2694. set yaml value "config.kits.builder.items.5 159:4" from file "../../BlockWars/kits.yml" to ""
  2695. set yaml value "config.kits.jumper.name" from file "../../BlockWars/kits.yml" to "Jumper"
  2696. 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"
  2697. set yaml value "config.kits.jumper.icon" from file "../../BlockWars/kits.yml" to "1 301:0"
  2698. set yaml value "config.kits.jumper.purchase" from file "../../BlockWars/kits.yml" to "true"
  2699. set yaml value "config.kits.jumper.price" from file "../../BlockWars/kits.yml" to "600"
  2700. set yaml value "config.kits.jumper.armour.helmet" from file "../../BlockWars/kits.yml" to "298:0"
  2701. set yaml value "config.kits.jumper.armour.chestplate" from file "../../BlockWars/kits.yml" to "299:0"
  2702. set yaml value "config.kits.jumper.armour.leggings" from file "../../BlockWars/kits.yml" to "300:0"
  2703. set yaml value "config.kits.jumper.armour.boots" from file "../../BlockWars/kits.yml" to "301:0"
  2704. set yaml value "config.kits.jumper.items.1 268:0" from file "../../BlockWars/kits.yml" to ""
  2705. set yaml value "config.kits.jumper.items.1 261:0" from file "../../BlockWars/kits.yml" to ""
  2706. set yaml value "config.kits.jumper.items.1 262:0" from file "../../BlockWars/kits.yml" to ""
  2707. set yaml value "config.kits.jumper.items.1 373:8235" from file "../../BlockWars/kits.yml" to ""
  2708. if existence of "plugins/BlockWars/rewards.yml" is false:
  2709. send "%{bw.config::prefix}% &2File rewards.yml create!" to {_sender}
  2710. create file "plugins/BlockWars/rewards.yml"
  2711. set yaml value "config.rewards.win.money.enable" from file "../../BlockWars/rewards.yml" to "true"
  2712. set yaml value "config.rewards.win.money.amount" from file "../../BlockWars/rewards.yml" to "15"
  2713. set yaml value "config.rewards.win.command.enable" from file "../../BlockWars/rewards.yml" to "false"
  2714. set yaml value "config.rewards.win.command.cmd" from file "../../BlockWars/rewards.yml" to "give <player> diamond 5"
  2715. set yaml value "config.rewards.win.message.enable" from file "../../BlockWars/rewards.yml" to "true"
  2716. set yaml value "config.rewards.win.message.msg" from file "../../BlockWars/rewards.yml" to "&6+15 points"
  2717. set yaml value "config.rewards.capture.money.enable" from file "../../BlockWars/rewards.yml" to "true"
  2718. set yaml value "config.rewards.capture.money.amount" from file "../../BlockWars/rewards.yml" to "10"
  2719. set yaml value "config.rewards.capture.command.enable" from file "../../BlockWars/rewards.yml" to "false"
  2720. set yaml value "config.rewards.capture.command.cmd" from file "../../BlockWars/rewards.yml" to ""
  2721. set yaml value "config.rewards.capture.message.enable" from file "../../BlockWars/rewards.yml" to "true"
  2722. set yaml value "config.rewards.capture.message.msg" from file "../../BlockWars/rewards.yml" to "&6+10 points"
  2723. set yaml value "config.rewards.dropped.money.enable" from file "../../BlockWars/rewards.yml" to "true"
  2724. set yaml value "config.rewards.dropped.money.amount" from file "../../BlockWars/rewards.yml" to "5"
  2725. set yaml value "config.rewards.dropped.command.enable" from file "../../BlockWars/rewards.yml" to "false"
  2726. set yaml value "config.rewards.dropped.command.cmd" from file "../../BlockWars/rewards.yml" to ""
  2727. set yaml value "config.rewards.dropped.message.enable" from file "../../BlockWars/rewards.yml" to "true"
  2728. set yaml value "config.rewards.dropped.message.msg" from file "../../BlockWars/rewards.yml" to "&6+5 points"
  2729. set yaml value "config.rewards.kill.money.enable" from file "../../BlockWars/rewards.yml" to "true"
  2730. set yaml value "config.rewards.kill.money.amount" from file "../../BlockWars/rewards.yml" to "5"
  2731. set yaml value "config.rewards.kill.command.enable" from file "../../BlockWars/rewards.yml" to "false"
  2732. set yaml value "config.rewards.kill.command.cmd" from file "../../BlockWars/rewards.yml" to ""
  2733. set yaml value "config.rewards.kill.message.enable" from file "../../BlockWars/rewards.yml" to "true"
  2734. set yaml value "config.rewards.kill.message.msg" from file "../../BlockWars/rewards.yml" to "&6+5 points"
  2735. set yaml value "config.rewards.participation.money.enable" from file "../../BlockWars/rewards.yml" to "true"
  2736. set yaml value "config.rewards.participation.money.amount" from file "../../BlockWars/rewards.yml" to "1"
  2737. set yaml value "config.rewards.participation.command.enable" from file "../../BlockWars/rewards.yml" to "false"
  2738. set yaml value "config.rewards.participation.command.cmd" from file "../../BlockWars/rewards.yml" to ""
  2739. set yaml value "config.rewards.participation.message.enable" from file "../../BlockWars/rewards.yml" to "false"
  2740. set yaml value "config.rewards.participation.message.msg" from file "../../BlockWars/rewards.yml" to "&6+1 point"
  2741. if existence of "plugins/BlockWars/scoreboard.yml" is false:
  2742. send "%{bw.config::prefix}% &2File scoreboard.yml create!" to {_sender}
  2743. create file "plugins/BlockWars/scoreboard.yml"
  2744. wf "## BlockWars MINIGAME - Scoreboard ##" to "plugins/BlockWars/scoreboard.yml"
  2745. wf "## Lobby Variables: <arena> - <amount> - <max> - <empty> ##" to "plugins/BlockWars/scoreboard.yml"
  2746. wf "## Ingame Variables: <arena> - <amount> - <max> - <phase> - <time> - <blue-flag-captured> - <red-flag-captured> - <empty> ##" to "plugins/BlockWars/scoreboard.yml"
  2747. wf "## Maximum 40 characters per line ##" to "plugins/BlockWars/scoreboard.yml"
  2748. set yaml value "scoreboard.lobby.title" from file "../../BlockWars/scoreboard.yml" to "&e&lBlockWars"
  2749. add "&2Map" to yaml list "scoreboard.lobby.lines" from file "../../BlockWars/scoreboard.yml"
  2750. add "&f<arena>" to yaml list "scoreboard.lobby.lines" from file "../../BlockWars/scoreboard.yml"
  2751. add "<empty>" to yaml list "scoreboard.lobby.lines" from file "../../BlockWars/scoreboard.yml"
  2752. add "&2Players" to yaml list "scoreboard.lobby.lines" from file "../../BlockWars/scoreboard.yml"
  2753. add "&f<amount>/<max>" to yaml list "scoreboard.lobby.lines" from file "../../BlockWars/scoreboard.yml"
  2754. add "<empty>" to yaml list "scoreboard.lobby.lines" from file "../../BlockWars/scoreboard.yml"
  2755. add "&fwww.mc-server.com" to yaml list "scoreboard.lobby.lines" from file "../../BlockWars/scoreboard.yml"
  2756. set yaml value "scoreboard.ingame.title" from file "../../BlockWars/scoreboard.yml" to "&e&lBlockWars"
  2757. add "<phase>&7: <time>" to yaml list "scoreboard.ingame.lines" from file "../../BlockWars/scoreboard.yml"
  2758. add "<empty>" to yaml list "scoreboard.ingame.lines" from file "../../BlockWars/scoreboard.yml"
  2759. add "&9Blue&7: <blue-flag-captured> captures" to yaml list "scoreboard.ingame.lines" from file "../../BlockWars/scoreboard.yml"
  2760. add "&cRed&7: <red-flag-captured> captures" to yaml list "scoreboard.ingame.lines" from file "../../BlockWars/scoreboard.yml"
  2761. add "<empty>" to yaml list "scoreboard.ingame.lines" from file "../../BlockWars/scoreboard.yml"
  2762. add "&fwww.mc-server.com" to yaml list "scoreboard.ingame.lines" from file "../../BlockWars/scoreboard.yml"
  2763. set {bw.config::scoreboard-lobby::title} to yaml value "scoreboard.lobby.title" from file "../../BlockWars/scoreboard.yml"
  2764. set {bw.config::scoreboard-lobby::lines::*} to yaml list "scoreboard.lobby.lines" from file "../../BlockWars/scoreboard.yml"
  2765. set {bw.config::scoreboard-ingame::title} to yaml value "scoreboard.ingame.title" from file "../../BlockWars/scoreboard.yml"
  2766. set {bw.config::scoreboard-ingame::lines::*} to yaml list "scoreboard.ingame.lines" from file "../../BlockWars/scoreboard.yml"
  2767. send "&aReload successfully!" to {_sender}
Advertisement
Add Comment
Please, Sign In to add comment