モブの体力をサイドバーに表示する。ここではエンダーマンを例にする。
1. healthというobjectを作成
/scoreboard objectives add health dummy
2. サイドバーに表示する
/scoreboard objectives setdisplay sidebar health
3. 体力(Health)を格納する
コマンドブロック: Repeat, Unconditional, Always active
/execute as @e[type=enderman, limit=1] run execute store result score enderman health run data get entity @s Health