tellraw @a[team=P] ["",{"text":"You are on Night ","color":"blue"},{"score":{"name":"@e[name=DayQ]","objective":"DayQ2"},"color":"blue"},{"text":".","color":"blue"}]
setblock 999979 144 999976 chain_command_block[facing=up]{auto:1b,Command:"execute as @a[tag=DuskDraught,predicate=suhc:onsurface] run function zzzzdonotuse:7sec/duskdraughteffect",TrackOutput:0} destroy

tag @a[nbt={Inventory:[{Slot:103b,tag:{kyuglasswardmodule:1b}}]}] add GlassWard
tellraw @a[nbt={Inventory:[{Slot:103b,tag:{kyuglasswardmodule:1b}}]}] ["",{"text":"Your 'glass ward' module has refreshed!","color":"yellow","italic":"true"}]

tag @s add IsNightKyu
tag @s remove IsDayKyu

tag @e[type=armor_stand,name=DayQ,limit=1] add CheckStructures
execute store result score @e[type=armor_stand,name=DayQ,limit=1] StructureLoadCheck run locate structure suhc:stalagmitebase
execute as @e[type=armor_stand,name=DayQ,limit=1,scores={StructureLoadCheck=1..}] run tag @s remove CheckStructures
execute store result score @e[type=armor_stand,name=DayQ,limit=1] StructureLoadCheck run locate structure suhc:skeletonoutpostbase
execute as @e[type=armor_stand,name=DayQ,limit=1,scores={StructureLoadCheck=1..}] run tag @s remove CheckStructures
execute store result score @e[type=armor_stand,name=DayQ,limit=1] StructureLoadCheck run locate structure suhc:enchantedcavernbase
execute as @e[type=armor_stand,name=DayQ,limit=1,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"}]

tag @e[type=armor_stand,name=DayQ,limit=1] remove CheckStructures
