メインコンテンツまでスキップ

Action 一覧

action または actions で使用可能な12種類の型付きアクションの完全リファレンスです。


アクション一覧表​

タイプ (type)主な設定キー説明
commandcommand, executor実行者(player または console)を指定してコマンドを実行します。
player-commandcommandクリックしたプレイヤー自身としてコマンドを実行します。
console-commandcommandサーバーコンソール(最高権限)としてコマンドを実行します。
open-menumenu指定したメニューへ画面遷移します。描画完了まで待機します。
close-menuなし操作元のメニュー画面を安全に閉じます。
messagemessageプレイヤーにチャットメッセージを送信します。
soundsound, volume, pitchプレイヤーに効果音を再生します。
titletitle, subtitle, fade-in, stay, fade-out画面中央にタイトル・サブタイトルを表示します。
teleportworld, x, y, z, yaw, pitch, reset-velocity, no-fall-ticks(safe は読み込まれますが効果なし)プレイヤーを指定ワールド・座標へテレポートします。
delayduration指定時間だけ後続アクションの実行を非同期待機します。
potion-effecteffect, duration, amplifier, ambient, particlesプレイヤーにステータス効果を付与します。
inputprompt, input-type(string / integer / decimal), min, max, timeout-seconds, variable, command, actionsチャットで入力を受け付けてから処理を継続します。

各アクションの詳細記法​

command​

type: command
command: "spawn"
executor: player # player (既定値) または console。それ以外はエラー

command は必須です。type: player-command と type: console-command も同様に、空の command はエラー(empty-command)です。

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

未知のサウンド名は警告(unknown-sound)になり、このアクションだけが取り除かれます。メニュー自体は開きます。

title​

type: title
title: "&6&lクエスト達成"
subtitle: "&a報酬を獲得しました"
fade-in: 10 # tick単位(既定: 10)
stay: 70 # (既定: 40)
fade-out: 20 # (既定: 10)

title と subtitle の少なくとも一方が必要です。tick値に負の値は指定できません。

teleport​

type: teleport
world: "world"
x: 100.5
y: 64.0
z: -200.5
yaw: 0.0
pitch: 0.0
reset-velocity: true # 慣性をリセット (既定: true)
no-fall-ticks: 40 # 落下距離をリセットし続けるtick数 (既定: 0、最大1200)

safe キーは読み込まれますが、現在の実装では使われません(安全な足場の検索は行われません)。

delay​

type: delay
duration: 2s # 500ms, 2s, 1m, 40t など。0以下・不正値はエラー

potion-effect​

type: potion-effect
effect: "SPEED" # 必須。SPEED のような定数名や speed のようなキー名
duration: 30s # 既定: 10s
amplifier: 1 # 0 = Lv1, 1 = Lv2(既定: 0)
ambient: true # 既定: false
particles: true # 既定: true

存在しない効果名はクリック時に失敗として扱われ、それ以降のアクションは実行されません。

input​

type: input
prompt: "&e希望の引き出し額を入力してください:"
input-type: integer # string(既定), integer, decimal
min: 1
max: 50000
timeout-seconds: 30 # 既定: 60
variable: input # 既定: input(`{input}` の名前)
command: "bank withdraw {player} {input}" # {変数名} を必ず含める

詳しくは 高度なアクション を参照してください。