函数

在function.yml中定义的动作组

定义

我们可以在plugins/Craftorithm/function.yml中将多个动作打包为一个组,称之为函数。

格式

函数名:
  - '语句1'
  - '语句2'
  ...

在此处定义的函数体,会被视为语句进行解析,可以被当作语句使用。

示例

function.yml

example:
  - 'if level > 100'
  - |-
    take-level 10
    return
  - 'take-level 1'
test:
  - return all perm craftorithm.perm.example && level >= 100 && papi %player_name% == YufiriaMazenta

recipes/example_shaped.yml

最后更新于