execute if entity @e[name=DayQ,type=armor_stand] run execute unless entity @e[name=KyuPatch,type=armor_stand] run summon minecraft:armor_stand 999990 137 999984 {CustomName:"\"KyuPatch\"",NoGravity:1,Invisible:1b,Silent:1b,Invulnerable:1}
execute if entity @e[name=DayQ,type=armor_stand] run execute unless entity @e[tag=CurrentPatch,type=armor_stand] run summon minecraft:armor_stand 999990 137 999984 {CustomName:"\"Version ???\"",Tags:["CurrentPatch"],NoGravity:1,Invisible:1b,Silent:1b,Invulnerable:1}
tellraw @a ["",{"text":"Thank you for installing Super UHC! To change difficulty, type '/function changedifficulty'.","color":"yellow"},{"text":"","color":"red"}]
tellraw @a ["",{"text":" To begin, type '/function suhcstart'","color":"gold"},{"text":"","color":"red"}]
tellraw @a ["",{"text":"\nNOTE: THIS WILL CLEAR EVERYONE'S INVENTORIES AND TELEPORT THEM!","color":"red"},{"text":"","color":"red"}]
tellraw @a ["",{"text":"\nDOUBLE NOTE: THIS MOD FEATURES DESTRUCTIVE ELEMENTS SUCH AS METEOR STORMS. YOU HAVE BEEN WARNED. ","color":"dark_red"},{"text":"","color":"red"}]
tellraw @a ["",{"text":"\nSee '/function suhchelp' for more info on commands.","color":"green"},{"text":"","color":"red"}]
tellraw @a ["",{"text":"\nANOTHER NOTE: See 'function overridechecksettings' if you wish to double check certain settings. ","color":"dark_red"},{"text":"","color":"red"}]
tellraw @a ["",{"text":"\nIf you are experiencing any issues, try checking the ","color":"gold"},{"text":" [DEBUG]","bold":true,"underlined":true,"color":"gold","clickEvent":{"action":"run_command","value":"/function suhc:debug"}},{"text":", or join our ","color":"gold"},{"text":"[Discord]","bold":true,"underlined":true,"color":"gold","clickEvent":{"action":"open_url","value":"https://discord.gg/MPsTcvu"}},{"text":".","color":"gold"}]
tellraw @a ["",{"text":"","color":"red"}]

#function suhc:installpatch
#tellraw @a ["",{"text":"Current version: ","color":"yellow"},{"selector":"@e[tag=CurrentPatch]","color":"yellow"}]


#execute at @e[name=KyuLake] positioned ~ ~-6 ~ run setblock ~ ~ ~ minecraft:dispenser{Items:[{Slot:0,id:"minecraft:prismarine_shard",Count:1b,tag:{display:{Name:"\"Enchanted Shard\"",Lore:["\"Anyone who holds one of these\"","\"will be granted permanent water-breathing\"","\"and underwater mining haste.\""]}}},{Slot:1,id:"minecraft:written_book",Count:1b,tag:{display:{Name:'{"text":"\'The Chest\' TL;DR","color":"aqua"}',Lore:['{"text":"Too long, didn\'t read."}']},title:"",author:"",pages:['[{"text":"TL;DR of the chest: Put unwanted gear in it and you might get some components back. Enchanted gear may give back enchantments.","color":"dark_aqua"},{"text":"\\nIf you want more details, click here to open up a link with more info.","color":"dark_purple","clickEvent":{"action":"open_url","value":"https://imgur.com/a/3WyF2v6"}},{"text":"\\n\\n(or click here for a direct picture link)","color":"light_purple","clickEvent":{"action":"open_url","value":"https://i.imgur.com/T0O1wiQ.png"}}]']}}]}