# --- KitPVP --- command /kitpvp [] []: description: Spawn executable by: players trigger: if player's world is "minigames": if arg-1 is not set: wait 2 tick open chest inventory with 4 row named "KitPVP" to player wait 2 tick loop integers between 0 and 35: format slot loop-integer of player with gray stained glass pane named "&7" to be unstealable if {kitpvp.%player%.map} is set: if {kitpvp.%player%.map} is "winter": format slot 12 of player with compass named "&fKartta" with lore "Talvi" to close then run [execute player command "/kitpvp setmap"] if {kitpvp.%player%.map} is "nether": format slot 12 of player with compass named "&fKartta" with lore "Horna" to close then run [execute player command "/kitpvp setmap"] if {kitpvp.%player%.map} is "farm": format slot 12 of player with compass named "&fKartta" with lore "Farmi" to close then run [execute player command "/kitpvp setmap"] else: format slot 12 of player with compass named "&fKartta" to close then run [execute player command "/kitpvp setmap"] if {kitpvp.%player%.kit} is set: if {kitpvp.%player%.kit} is "soldier": format slot 14 of player with iron chestplate named "&fKitit" with lore "Sotilas" to close then run [execute player command "/kitpvp setkit"] else: format slot 14 of player with iron chestplate named "&fKitit" to close then run [execute player command "/kitpvp setkit"] if {kitpvp.%player%.map} and {kitpvp.%player%.kit} is set: format slot 35 of player with nether star named "&fAloita" to close then run [execute player command "/kitpvp start"] stop else: if arg-1 is "setmap": if arg-2 is not set: wait 2 tick open chest inventory with 4 row named "KitPVP - Valitse kartta" to player wait 2 tick loop integers between 0 and 35: format slot loop-integer of player with gray stained glass pane named "&7" to be unstealable format slot 11 of player with snow block named "&fTalvi" to close then run [execute player command "/kitpvp setmap winter"] format slot 13 of player with netherrack named "&fHorna" to close then run [execute player command "/kitpvp setmap nether"] format slot 15 of player with hay bale named "&fFarmi" to close then run [execute player command "/kitpvp map farm"] else: if arg-2 is "winter": set {kitpvp.%player%.map} to "winter" stop if arg-2 is "nether": set {kitpvp.%player%.map} to "nether" stop if arg-2 is "farm": set {kitpvp.%player%.map} to "farm" stop stop else if arg-1 is "setkit": if arg-2 is not set: wait 2 tick open chest inventory with 4 row named "KitPVP - Valitse kitti" to player wait 2 tick loop integers between 0 and 35: format slot loop-integer of player with gray stained glass pane named "&7" to be unstealable format slot 11 of player with iron helmet named "&fSotilas" to close then run [execute player command "/kitpvp setkit soldier"] #format slot 13 of player with netherrack named "&fHorna" to close then run [execute player command "/kitpvp setmap nether"] #format slot 15 of player with hay bale named "&fFarmi" to close then run [execute player command "/kitpvp map farm"] stop else: if arg-2 is "soldier": set {kitpvp.%player%.kit} to "soldier" stop stop else if arg-1 is "start": if {kitpvp.%player%.kit} is set: if {kitpvp.%player%.kit} is "soldier": set player's helmet to iron helmet set player's chestplate to iron chestplate set player's leggings to iron leggings set player's boots to iron boots else: make player execute command "/kitpvp" if {kitpvp.%player%.map} is set: if {kitpvp.%player%.map} is "winter": if {kitpvp.%player%.map} is "nether": if {kitpvp.%player%.map} is "farm": else: make player execute command "/kitpvp" stop else: stop stop else: stop on join: if player's world is "minigames": remove all items from player set slot 0 of player's inventory to 1 of chest named "&fKitPVP" stop on respawn: if player's world is "minigames": set slot 0 of player's inventory to 1 of chest named "&fKitPVP" stop on quit: if player's world is "minigames": remove all items from player clear {kitpvp.%player%} stop on leftclick: if player's world is "minigames": if event-item is chest named "&fKitPVP": make player execute command "/kitpvp" cancel the event wait 2 tick on rightclick: if player's world is "minigames": if event-item is chest named "&fKitPVP": make player execute command "/kitpvp" cancel the event wait 2 tick on inventory click: if player's world is "minigames": if event-item is chest named "&fKitPVP": cancel the event on drop: if player's world is "minigames": if event-item is chest named "&fKitPVP": cancel the event on pickup: if player's world is "minigames": if event-item is chest named "&fKitPVP": delete event-entity on death: if player's world is "minigames": clear drops