kill
概要
kill は、プレイヤーをキルする ScriptEvent です。
プレイヤーを死亡させ、リスポーン地点に戻します。
構文
/scriptevent capi:kill
パラメータ
なし
使用例
シンプルなキル
プレイヤーをキルします。
/execute as @a[tag=kill] run scriptevent capi:kill
条件付きキル
特定の条件でプレイヤーをキルします。
/execute as @a[y=0,dy=-64] run scriptevent capi:kill
ペナルティとしてのキル
ルール違反時にキルします。
/execute as @a[tag=penalty] run scriptevent capi:kill
範囲外に出たプレイヤーをキル
ゲームエリア外に出たプレイヤーをキルします。
/execute as @a[x=0,y=0,z=0,distance=100..] run scriptevent capi:kill
ゲーム終了時にキル
ゲーム終了時に全プレイヤーをキルします。
/execute as @a run scriptevent capi:kill
注意事項
- プレイヤーのみが実行できます
- 実行前にゲームモードを Adventure に変更し、実行後に元に戻します
- これにより、クリエイティブモードでもキルが機能します
- アイテムは通常通りドロップします
- キープインベントリのルールに従います