通用動作

這些動作可以三端通用,Spigot、Velocity、BungeeCord。

Delay

延遲執行動作

action:
  +: TJAction
  delay_1:
    message: 'wtf' # 此訊息將在 10 秒後才發送
    delay: '10s'
Group

打包動作成為動作組,建議配合其他動作使用。

action:
  +: TJAction
  random_1:
    message_1: '&c你沒抽中 :('
    group_1:
      message_1: '&a恭喜獲得 &b鑽石 &fx10&a!'
      console_1: 'give %player_name% diamond 10'
Loop

來點重複的樂趣?

action:
  +: TJAction
  loop_1:
    time: '3' # 此參數接受運算式,故 '' 不可缺少。
    message: '&e我會跑三次。'
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你不在海平面上!'
Broadcast

將動作委託給所有玩家

action:
  +: TJAction
  broadcast:
    message: '現在,大家都知道我很吵了 ><'
AsConsole

將動作委託給後台

action:
  +: TJAction
  asconsole:
    message: '後台看到我了??'
Function

執行插件註冊的特定動作

action:
  +: TJAction
  function: 'input'

條件類動作

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'
If

如果?

action:
  +: TJAction
  if_1:
    condition:
      hasperm_1: 'hello.world'
    n: 
      message: '&c你沒有 hello.world 權限'
    y: 
      message: 'Hello World!'
action:
  +: TJAction
  if_1:
    expr: '%player_y% > 63 and %player_level% >= 10' # 簡易運算式
    y:
      message: '&b你在海平面上且你有 10 等!'
    n:
      message: '&c你在海平面下或未達 10 等!'
Not

取反運算

action:
  +: TJAction
  if_1:
    condition:
      not_1:
        hasperm_2: 'hello_world'
    n: 
      message: 'Hello World!'
    y: 
      message: '&c你沒有 hello_world 權限'

Last updated