深色模式
物品定义
物品文件放在 plugins/SealItems/items/*.yml。一个文件可含多个顶层物品 ID,也可按类别拆文件。ID 是其他系统引用的稳定身份。
完整字段示例
yaml
example_blade:
item:
material: DIAMOND_SWORD
name: '<aqua>示例长剑'
lore:
- '<gray>完整字段演示装备'
- '<dark_gray>稳定 ID:example_blade'
custom-model-data: 10001
unbreakable: false
damage: 0
enchantment-glint: true
item-flags: [hide-attributes]
instance: individual
tags: [equipment, weapon, sword]
equipment:
attributes:
sealattributes:physical_attack:
add: { min: 18, max: 24 }
sealattributes:max_health:
add: 20
total-percent: 0.05
affixes:
scheme: standard_weapon
affix-level: 25
slots:
primary: { capacity: 3, initial: 2 }
secondary: { capacity: 2, initial: 1 }
quality:
pool: { rare: 80, epic: 20 }根层只接受 item、instance、tags、equipment、affixes、quality。
item 外观字段
| 字段 | 是否必需 | 说明 |
|---|---|---|
material | 是 | Paper 原版 Material 名称 |
name | 否 | MiniMessage 名称 |
lore | 否 | MiniMessage 行列表 |
custom-model-data | 否 | 整数模型编号 |
unbreakable | 否 | 是否不可破坏 |
damage | 否 | 当前耐久损伤;只能用于有耐久材质且不可越界 |
enchantment-glint | 否 | 强制展示光效 |
item-flags | 否 | 例如 hide-attributes |
dye-color | 否 | 仅可染皮革,格式 '#RRGGBB' |
染色例子:
yaml
purple_chestplate:
item:
material: LEATHER_CHESTPLATE
name: '<light_purple>紫晶皮甲'
dye-color: '#6A4C93'
instance: individual
tags: [equipment, armor, chestplate]individual 与 stackable
individual
每件有实例 UUID 和 revision,可保存随机属性、品质、词条、鉴定状态、孔位、宝石和保底状态。装备通常使用它。
stackable
适合卷轴、石头、粉尘等材料,不保存逐件状态。完整材料例子:
yaml
reforge_stone:
item:
material: FIRE_CHARGE
name: '<gold>重铸石'
instance: stackable
tags: [affix-material]不能给 stackable 配置品质、词条、鉴定或孔位独立状态。
装备基础属性
yaml
equipment:
attributes:
sealattributes:physical_attack:
add: 25
total-percent: 0.10
sealattributes:max_health:
add: { min: 15, max: 25 }add是加法贡献。total-percent: 0.10表示总百分比 10%,不是 0.10%。- 值可为固定数字或
{ min, max }。随机值仅首次生成时抽取并持久化,不会每次穿戴重抽。 - 属性 ID 与 operation 必须被 SealAttributes 接受,否则配置拒绝发布。
词条方案与槽位覆盖
yaml
affixes:
scheme: standard_weapon
affix-level: 25
slots:
primary: { capacity: 3, initial: 2 }
secondary: { capacity: 2, initial: 1 }scheme引用affix-schemes/*.yml。affix-level决定可用 tier;缺省时使用方案默认等级。- 物品层
slots可覆盖方案。如果写了slots,主/副两类都必须完整。 capacity是最大槽数,initial是首次生成已填充数,必须initial <= capacity。
品质:固定或池
二选一:
yaml
quality:
fixed: epicyaml
quality:
pool: { rare: 80, epic: 20 }权重不是百分比,80:20 等价于 4:1。品质只在生成时决定,之后持久化。
修改和验证
text
/si reload items
/si list
/si give 玩家名 example_blade 1 epic unidentified
/si inspect常见错误:引用的品质/方案不存在;stackable 带状态;随机范围倒置;材质无耐久却写 damage;皮革外材质写 dye-color;槽位初始数超过容量;属性 ID 不存在。