music_quiz: chat_answer 모드 활성화 시 로그인 메세지 표시
mq:load 가 storage chat_answer:status active 를 0b 로 초기화. chat_answer 모드의 PlayerLoggedInEvent / ServerPlayConnectionEvents.JOIN 핸들러가 첫 로그인 직후 1b 로 set 하므로, mq:players/login 에서 1b 인 경우 "[채팅정답] 모드가 활성화되어 있습니다. 정답 입력 시 채팅으로 바로 제출할 수 있습니다." tellraw.
This commit is contained in:
@@ -2,6 +2,10 @@ data modify storage mq:main answer set value {title:"", author:"", alias:[]}
|
||||
data merge storage func:temp {}
|
||||
data merge storage mq:tmp {}
|
||||
|
||||
# chat_answer 모드 활성화 플래그 초기화. 모드가 살아있으면 첫 플레이어 로그인 직후
|
||||
# 모드가 다시 1b 로 set 함. 모드가 빠지면 이대로 0b 유지 → 로그인 메세지 미표시.
|
||||
data modify storage chat_answer:status active set value 0b
|
||||
|
||||
function mq:init/config
|
||||
function mq:init/songs
|
||||
function mq:init/buttons
|
||||
|
||||
@@ -8,3 +8,7 @@ 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"}]
|
||||
|
||||
Reference in New Issue
Block a user