26 lines
2.0 KiB
MCFunction
26 lines
2.0 KiB
MCFunction
# warn-off execute-group
|
|
execute if score init main matches 0..1 run scoreboard players enable @a ready
|
|
execute if score init main matches 0..1 as @a if score @s ready matches 1 run function mq:tellraw {"text":"","color":"black",msg:[{"selector":"@s","color": "yellow","bold": true},{"text":" : ","color":"gray"},{"text":"준비완료","color":"white"}]}
|
|
execute if score init main matches 0..1 as @a if score @s ready matches 1 run scoreboard players set @s ready 2
|
|
execute if score init main matches 0..1 as @a if score @s ready matches 3 run function mq:tellraw {"text":"","color":"black",msg:[{"selector":"@s","color": "yellow","bold": true},{"text":" : ","color":"gray"},{"text":"이미 준비완료 상태입니다.","color": "red"}]}
|
|
execute if score init main matches 0..1 as @a if score @s ready matches 3 run scoreboard players set @s ready 2
|
|
|
|
|
|
execute if score init main matches 0..1 run scoreboard players enable @a cancel
|
|
execute if score init main matches 0..1 as @a if score @s cancel matches 1 run function mq:tellraw {"text":"","color":"black",msg:[{"selector":"@s","color": "yellow","bold": true},{"text":" : ","color":"gray"},{"text":"취소를 선택하셨습니다.","color": "red"}]}
|
|
execute if score init main matches 0..1 as @a if score @s cancel matches 1 run function mq:commands/stop with storage mq:main
|
|
|
|
|
|
execute if score init main matches 0..1 store result score max_player ready if entity @a
|
|
execute if score init main matches 0..1 store result score ready_player ready if entity @a[scores={ready=2..}]
|
|
execute if score init main matches 0..1 \
|
|
unless score max_player ready matches 0 \
|
|
if score max_player ready = ready_player ready \
|
|
run function mq:quiz/start with storage mq:main
|
|
|
|
|
|
function mq:repeat/triggers/trigger with storage mq:main trigger_defs[0]
|
|
function mq:repeat/triggers/trigger with storage mq:main trigger_defs[1]
|
|
function mq:repeat/triggers/trigger with storage mq:main trigger_defs[2]
|
|
function mq:repeat/triggers/trigger with storage mq:main trigger_defs[3]
|