#execute unless entity @e[name=DayQ,type=armor_stand] run tellraw @a ["",{"text":"Super UHC is being added, please wait a few moments...","color":"gold"}]
#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}












scoreboard objectives add KyuDummy5 dummy
execute unless score #KyuQStructuresInstall KyuDummy5 matches 1 run function zzzzdonotuse:misc/configandstuff/scoreboardobjectives
execute unless score #KyuQStructuresInstall KyuDummy5 matches 1 run function zzzzdonotuse:misc/configandstuff/spawnstartcommandblocks
function zzzzdonotuse:misc/configandstuff/installpatch
tellraw @a ["",{"text":"Kyu&Q Structures current version: ","color":"yellow"},{"selector":"@e[tag=CurrentPatch]","color":"yellow"},{"text":".","color":"yellow"},{"text":" Click here for more info/settings for SUHC.","bold":false,"color":"gold","clickEvent":{"action":"run_command","value":"/function zzzzdonotuse:misc/configandstuff/suhcinfo"}}]

scoreboard objectives add StructureLoadCheck dummy
tag @s add CheckStructures
execute store result score @s StructureLoadCheck run execute in overworld run locate structure suhc:stalagmitebase
execute as @s[scores={StructureLoadCheck=1..}] run tag @s remove CheckStructures
execute store result score @s StructureLoadCheck run execute in overworld run locate structure suhc:skeletonoutpostbase
execute as @s[scores={StructureLoadCheck=1..}] run tag @s remove CheckStructures
execute store result score @s StructureLoadCheck run execute in overworld run locate structure suhc:enchantedcavernbase
execute as @s[scores={StructureLoadCheck=1..}] run tag @s remove CheckStructures

#execute as @e[type=armor_stand,name=DayQ,tag=CheckStructures] run tellraw @a[tag=K] ["",{"text":"Structures do not appear to be loading properly. Please restart the server, and submit a bug report if this message appears again afterwards.","color":"yellow","italic":"false"}]

execute as @s[tag=CheckStructures] run tellraw @a ["",{"text":"NOTE: Structures are not spawning. You will need to restart your world/server in order to make structures start spawning.","color":"gold"}]


scoreboard players set #KyuQStructuresInstall KyuDummy5 1