通用動作
這些動作可以三端通用,Spigot、Velocity、BungeeCord。
Group
打包動作成為動作組,建議配合其他動作使用。
action:
+: TJAction
random_1:
message_1: '&c你沒抽中 :('
group_1:
message_1: '&a恭喜獲得 &b鑽石 &fx10&a!'
console_1: 'give %player_name% diamond 10'
Random
多選N?
action:
+: TJAction
random_1:
amount: 1 # (選出結果的數量,選填)
message_1: '&a我是一號。'
message_2: '&e我是二號。'
message_3: '&c我是三號。'
Set
設定參數為運算式結果(請見 If)。
變數僅存在記憶體,重啟會消失。
action:
+: TJAction
set_1:
id: 'hello'
expr: '%player_y% > 63'
keep: false # 是否只在不存在時設定,(選填)
if_1:
expr: '{hello}' # 使用 "{變數名}" 存取自訂變數
y:
message: '&b你在海平面上!'
n:
message: '&c你不在海平面上!'
條件類動作
HasPerm
權限檢查,回傳是否有權限
action:
+: TJAction
if_1:
condition:
hasperm_1: 'hello.world'
n:
message: '&c你沒有 hello.world 權限'
y:
message: 'Hello World!'
And
與運算
action:
+: TJAction
if_1:
condition:
and_1:
hasperm_1: 'hello.world'
hasperm_2: 'goodbye.world'
y:
message: 'Hello World!'
message_1: 'Goodbye World!'
n:
message: '&c你沒有 hello.world + goodbye.world 權限'
Or
或運算
action:
+: TJAction
if_1:
condition:
or_1:
hasperm_1: 'hello.world'
hasperm_2: 'hello_world'
y:
message: 'Hello World!'
n:
message: '&c你沒有 hello.world 或 hello_world 權限'
Check
多重檢查
action:
+: TJAction
check:
conditions:
- condition: 3 > 1
success: '好耶,3 > 1'
fail: '&c這不太可能發生@@?'
- condition:
not: '%player_health% > 10'
fail: '你血量太多了...'
success: # 所有檢查通過
message: '&aOk'
console: 'give %this% golden_apple'
fail: # 任一檢查失敗,可不寫
message: '&cFail'
Last updated