Skip to content

Commit

Permalink
#199 MCID検知と通知システムを実装
Browse files Browse the repository at this point in the history
  • Loading branch information
NePonpon committed Mar 23, 2024
1 parent 4c2a43e commit 9aa1cbd
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
8 changes: 8 additions & 0 deletions data/player/functions/mcid_change_detected.mcfunction
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
function player:initialized

tellraw @a ""
tellraw @a {"translate":"[INFO]\n プレイヤー名の変更を検知しました。ステータスが引き継がれていません。\n以下のページを参考にワールドデータのスコアボードファイルを修正してください。"}
tellraw @a ""
tellraw @a {"translate":"https://ai-akaishi.hatenablog.jp/entry/ar970627","underlined":true,"clickEvent":{"action":"open_url","value":"https://ai-akaishi.hatenablog.jp/entry/ar970627"}}
tellraw @a ""
tellraw @a {"translate":"修正が必要なプレイヤー : %1$s","with":[{"selector":"@s"}]}
3 changes: 3 additions & 0 deletions data/player/functions/tick.mcfunction
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
### プレイヤー毎ティック処理
##############################

### MCID変更検知
execute if entity @s[team=,tag=Initialized] run function player:mcid_change_detected

### 生き返り後処理
execute if entity @s[scores={Hunger=0..,Age=1..}] run function player:rise/

Expand Down

0 comments on commit 9aa1cbd

Please sign in to comment.