Skip to content

config.yml 全配置

所属:参考 · 相关:属性与数值 · 灵魂绑定

plugins/QinhItems/config.yml 全字段注解。改后 /qi reload 生效。

📄 想看完整原文 + 逐行批注?看 config.yml 原文逐行批注


本地化

yaml
language: zh_CN          # 消息语言代码

物品与目录

yaml
items-folder: items      # 物品 YAML 目录(相对插件数据目录,递归扫 *.yml)
default-type: misc       # 无 type 字段时的默认类型
give-overflow-drop: true # /qi give 背包满时溢出自然掉落

写域隔离(write-domains)

限制不同数据域的可写来源,详见 层与装配 → 写域策略

yaml
write-domains:
  strict: true                 # 严格域隔离(false = 宽松,仅警告)
  runtime-owners:              # RUNTIME 域允许 owner
    - qi_admin
    - qi_ui
    - admin
  runtime-prefixes:            # 或匹配前缀
    - buff_
    - temp_
    - ui_
  layer-owners:                # LAYER 域允许 owner
    - strengthen
    - forge
    - gem
    - enchant
    - socket
    - refine
    - embed
    - upgrade
  layer-prefixes:
    - sys_
    - layer_

动作路由(action-routing)

yaml
action-routing:
  strict: true     # true:动作里出现逻辑字段(if/when/switch…)报错;false:仅警告

动作系统 → 设计

动作运行时通知

yaml
actions:
  notify-cooldown: true              # 冷却中触发提示玩家
  notify-handler-unavailable: true   # 处理器不可用提示

战斗模块(combat)

yaml
combat:
  enabled: true              # false = 纯物品库模式(不加属性)
  attribute-backend: auto    # auto | attributeplus | noop
  swing:
    vanilla-hit: true        # 挥击时调 Bukkit attack(),由 AP 算伤害

属性与数值

属性映射(attribute-mapping)

ICVM 键 → AttributePlus 显示名。

yaml
attribute-mapping:
  attack_damage: "物理伤害"
  health: "生命"
  defense: "防御"
  attack_speed: "攻击速度"
  magic_damage: "魔法伤害"
  armor_penetration: "护甲穿透"
  max_mana: "最大魔法"
  mana_regen: "魔法恢复"
  # 未映射的键作 lore 传递,AP 不识别则忽略

灵魂绑定(soulbound)

yaml
soulbound:
  enabled: true
  lore-format: "&7{owner}的物品"      # 占位 {owner} {level}
  auto-bind-on-pickup: true
  scan-containers: true
  bypass-permission: "qinhitems.bypass.soulbound"
  message-cooldown-ticks: 20
  messages:
    drop: "&c该物品已被灵魂绑定,无法丢弃。"
    pickup: "&c该物品属于 {owner},你无法拾取。"
    move: "&c该物品属于 {owner},你无法移动。"
    container: "&c该容器内存放着已绑定的物品,无法破坏。"
    container-drop: "&c「{container}」中存有绑定物品,不可丢弃。"

完整说明见 灵魂绑定

宝石集成(gem / legendinlay / magicgem)

yaml
gem:
  inject-sockets: true        # 渲染孔 Lore
  inject-on-rebuild: false    # rebuild 时重新同步 provider

legendinlay:
  enabled: true
  stable-item-compare: true   # 稳定模板(PDC 比较一致)
  socket-catalog: integrations/legendinlay_sockets.yml
  inject-sockets: true
  inject-on-rebuild: false
  auto-deploy-lc-script: true # 自动部署 LegendCore groovy 兜底脚本

magicgem:
  enabled: true
  socket-catalog: integrations/magicgem_sockets.yml
  inject-sockets: true
  inject-on-rebuild: false

宝石孔


其它配置文件

文件内容章节
item_types.yml物品类型 / 能力物品类型
item_tiers.yml品质 Tier品质与显示
enchant_limits.yml附魔上限附魔上限
integrations/gem_socket_types.yml宝石孔类型宝石孔
integrations/legendinlay_sockets.ymlLI 孔目录宝石孔
integrations/magicgem_sockets.ymlMG 孔目录宝石孔
integrations/bridges.yml桥开关集成
integrations/resource_models.yml模型目录资源包

plugin.yml 元数据

yaml
name: QinhItems
version: '1.1.0'
main: com.qinhuai.items.QinhItems
api-version: '1.21'
author: Qinhuai
depend: [QinhCoreLib]              # 硬依赖
softdepend:
  - AttributePlus
  - QinhSkills
  - PlaceholderAPI
  - CraftEngine
  - MythicMobs
  - LegendCore
  - Legendinlay
  - MagicGem
  - ItemsAdder
  - Nexo

启动顺序参考

QI onEnable 大致顺序:依赖检查 → 释放内置内容 → 加载各配置对象 → 注册命令 → 注册监听器 → 初始化集成 / 桥 / 动作 / 战斗 → 加载资源目录 → 调度任务 → 注册物品源 → 加载物品 / 套装 / 库 / 动作表 → 链接 QinhSkills → 打印启动摘要。详见 安装


下一步