Skip to content

权限节点 ​

权限结构说明

从 1.15.1.0 起,插件权限采用「能力导向」命名,格式为 craftorithm.<域>.<能力>,命令与图形界面复用同一条权限。若你之前通过权限插件配置过旧节点(如 craftorithm.command.create、craftorithm.edit_recipe),需要按新节点进行迁移。

默认权限 ​

权限节点说明默认
craftorithm.command所有基础命令(根命令)OP
craftorithm.command.reload重载插件OP
craftorithm.command.version查看版本OP
craftorithm.command.script执行脚本OP
craftorithm.command.openmenu打开自定义菜单OP
craftorithm.command.recipebook打开配方书OP
craftorithm.recipe.create创建配方OP
craftorithm.recipe.remove删除配方OP
craftorithm.recipe.edit编辑配方OP
craftorithm.recipe.display展示配方OP
craftorithm.recipe.disable禁用配方OP
craftorithm.recipe.restore恢复被禁用的配方OP
craftorithm.recipe.discover为玩家解锁配方OP
craftorithm.recipe.undiscover取消解锁玩家的配方OP
craftorithm.item物品管理OP

触发器权限 ​

触发器中可使用自定义权限节点进行条件判断:

yaml
my_trigger:
  type: crafting
  recipes: ['craftorithm:my_recipe']
  conditions:
    - 'perm("craftorithm.trigger.vip")'
  actions:
    - 'tell("&aVIP 专属配方!")'

权限节点名称可自由定义,在触发器的 perm() 函数中引用即可。

通配符权限 ​

使用权限管理插件(如 LuckPerms)可设置通配符权限:

craftorithm.*          # 授予所有权限
craftorithm.command.*  # 授予所有命令权限

基于 GPL-3.0 许可证发布