Action 一覧
action または actions で使用可能な11種類の型付きアクションの完全リファレンスです。
アクション一覧表
タイプ (type) | 主な設定キー | 説明 |
|---|---|---|
command | command, executor | 実行者(player または console)を指定してコマンドを実行します。 |
player-command | command | クリックしたプレイヤー自身としてコマンドを実行します。 |
console-command | command | サーバーコンソール(最高権限)としてコマンドを実行します。 |
open-menu | menu | 指定したメニューへ画面遷移します。描画完了まで待機します。 |
close-menu | なし | 操作元のメニュー画面を安全に閉じます。 |
message | message | プレイヤーにチャットメッセージを送信します。 |
sound | sound, volume, pitch | プレイヤーに効果音を再生します。 |
title | title, subtitle, fade-in, stay, fade-out | 画面中央にタイトル・サブタイトルを表示します。 |
teleport | world, x, y, z, yaw, pitch, safe, reset-velocity, no-fall-ticks | プレイヤーを指定ワールド・座標へテレポートします。 |
delay | duration | 指定時間だけ後続アクションの実行を非同期待機します。 |
potion-effect | effect, duration, amplifier, ambient, particles | プレイヤーにステータス効果を付与します。 |
input | prompt, input-type, min, max, timeout-seconds, variable, command, actions | チャットで入力を受け付けてから処理を継続します。 |
各アクションの詳細記法
command
type: command
command: "spawn"
executor: player # player (既定値) または console
player-command
type: player-command
command: "warp survival"
console-command
type: console-command
command: "eco give {player} 1000"
open-menu
type: open-menu
menu: "shop" # sub/shop.yml を開く
close-menu
type: close-menu
message
type: message
message: "&aアイテムを購入しました!"
sound
type: sound
sound: "ENTITY_PLAYER_LEVELUP"
volume: 1.0 # 既定: 1.0
pitch: 1.2 # 既定: 1.0
title
type: title
title: "&6&lクエスト達成"
subtitle: "&a報酬を獲得しました"
fade-in: 10 # tick単位
stay: 70
fade-out: 20
teleport
type: teleport
world: "world"
x: 100.5
y: 64.0
z: -200.5
yaw: 0.0
pitch: 0.0
safe: true # 安全な足場を検索 (既定: true)
reset-velocity: true # 慣性をリセット (既定: true)
no-fall-ticks: 40 # 落下耐性tick数 (既定: 40)
delay
type: delay
duration: 2s # 500ms, 2s, 1m など
potion-effect
type: potion-effect
effect: "SPEED"
duration: 30s
amplifier: 1 # 0 = Lv1, 1 = Lv2
ambient: true
particles: true
input
type: input
prompt: "&e希望の引き出し額を入力してください:"
input-type: integer
min: 1
max: 50000
timeout-seconds: 30
command: "bank withdraw {player} {input}"