mq:load 가 storage chat_answer:status active 를 0b 로 초기화. chat_answer 모드의 PlayerLoggedInEvent / ServerPlayConnectionEvents.JOIN 핸들러가 첫 로그인 직후 1b 로 set 하므로, mq:players/login 에서 1b 인 경우 "[채팅정답] 모드가 활성화되어 있습니다. 정답 입력 시 채팅으로 바로 제출할 수 있습니다." tellraw.
15 lines
754 B
MCFunction
15 lines
754 B
MCFunction
tag @s add player
|
|
scoreboard players reset @s leave_game
|
|
|
|
title @s times 10t 80t 10t
|
|
title @s subtitle ""
|
|
title @s title ""
|
|
|
|
$setworldspawn $(x) $(y) $(z) $(r) $(f)
|
|
$tp @s $(x) $(y) $(z) $(r) $(f)
|
|
gamemode adventure @s
|
|
|
|
# chat_answer 모드가 살아있으면 PlayerLoggedInEvent 핸들러가 active=1b 로 set.
|
|
# mq:load 에서 0b 로 초기화되어 있으므로, 1b 인 상황 = 모드 활성.
|
|
execute if data storage chat_answer:status {active:1b} run tellraw @s ["",{"text":"[채팅정답] ","color":"green","bold":true},{"text":"모드가 활성화되어 있습니다.","color":"gray"},{"text":" 정답 입력 시 ","color":"gray"},{"text":"채팅","color":"yellow","bold":true},{"text":"으로 바로 제출할 수 있습니다.","color":"gray"}]
|