Skip to content

插件配置

宝石配置

yaml
# 通过匹配物品名包含“红宝石” 即可对所有符合条件的物品进行镶嵌和拆卸操作
# 更多表达式详情:https://yeecore.goodmc.cn/
红宝石:
  match: "match.name('红宝石')"
  slot:
    - "红宝石"
默认符文:
  match: "match.name('符文')"
  slot:
    - "符文孔"
yaml
# 宝石Id
默认宝石:
  # 参数 item 与 match 不可同时使用,二选一即可
  # 宝石匹配的物品库物品Id
  # 格式: "物品库-物品Id" 例如:"ni-默认宝石"
  # 可在config.yml中配置插件默认使用物品库,不填物品库Id时自动使用默认物品库
  # 已适配:https://www.goodmc.cn/YeeCore/物品库.html
  item: "默认宝石"
  # 宝石匹配表达式
  match: "match.lore('红宝石')"
  # 允许镶嵌的宝石孔
  slot:
    - "红宝石"
  # 以下所有参数均为可选,不需要可删除
  # 以下所有参数均为可选,不需要可删除
  # 以下所有参数均为可选,不需要可删除

  # 镶嵌后的孔位信息,覆盖孔位的镶嵌配置
  # 通常不需要使用该参数!
  #name: "§f已镶嵌 §7[§e默认宝石§7]"

  # 镶嵌后显示的lore
  # 删除该参数则不添加额外lore
  lore:
    - "&7&l> &3攻击力&7: &a15"
  # 额外生效属性
  # 插件默认通过宝石Lore读取属性,不建议使用该参数
  attribute:
    - "攻击力: 1000"
  # 是否从宝石的Lore中加载属性,默认值为 true
  load-gem-attribute: true
  # 宝石镶嵌
  inlay:
    # 所需金币
    money: 0
    # 所需点券
    points: 0
    # 镶嵌成功率
    probability: 1.0
    # 镶嵌条件
    condition:
      - ""
    # 镶嵌后执行动作
    action:
      - ""
    # 镶嵌失败执行动作
    fail-action:
      - ""
    # 镶嵌所需材料
    # 格式:物品库 物品Id 数量
    material:
      - "mm 测试材料 10"
  # 宝石拆卸
  take:
    # 所需金币
    money: 0
    # 所需点券
    points: 0
    # 拆卸成功率
    probability: 1.0
    # 拆卸条件
    condition:
      - ""
    # 拆卸后执行动作
    action:
      - ""
    # 拆卸失败执行动作
    fail-action:
      - ""
    # 拆卸所需材料
    # 格式:物品库 物品Id 数量
    material:
      - "mm 测试材料 10"
    # 拆卸器
    special:
      # 拆卸器匹配
      match: "match.lore('拆卸器')"
      # none-slot 和 none-return 未配置时,未使用拆卸器无法拆卸
      # 未使用拆卸器时的孔位替换方案
      none-slot: "红宝石-损坏"
      # 未使用拆卸器时是否返还宝石
      none-return: false
  # 镶嵌宝石增加的附魔效果
  enchantment:
    DAMAGE_ALL: 1
  # 物品上镶嵌该宝石数量上限,负数为不限制
  limit: -1
  # 镶嵌上限规则,可配置等级或权限条件,覆盖上方的limit参数
  limit-rules:
    1: "%player_level% <= 10"
    2: "%player_level% > 10"
    3: "%player_level% > 20"
    4: "%player_level% > 30"
    5: "%player_level% > 40"

孔位配置

yaml
红宝石:
  name: "§7可镶嵌 §7[§c红宝石§7]"
  inlay: "§f已镶嵌 §7[§r{gemName}§7]"
  show:
    material: RED_STAINED_GLASS_PANE
    name: "{slotName}"
红宝石-损坏:
  name: "§7已损坏 §7[§c红宝石§7]"
  repair:
    slot: "红宝石"
    material:
      - "mm 测试材料 10"
  show:
    material: RED_STAINED_GLASS_PANE
    name: "{slotName}"
    lore:
      - "{repair-template}"
    enchants:
      DURABILITY: 1
yaml
默认宝石:
  name: "§7可镶嵌 §7[§c红宝石§7]"
  # 镶嵌格式
  inlay: "§f已镶嵌 §7[§r{gemName}§7]"
  # 镶嵌条件
  condition:
    - ""
  # 镶嵌后执行动作
  action:
    - ""
  # 物品上镶嵌该类型的宝石数量上限,负数为不限制
  limit: -1
  # 镶嵌上限规则,可配置等级或权限条件,覆盖上方的limit参数
  limit-rules:
    1: "%player_level% <= 10"
    2: "%player_level% > 10"
    3: "%player_level% > 20"
    4: "%player_level% > 30"
    5: "%player_level% > 40"
  show:
    material: RED_STAINED_GLASS_PANE
    name: "{slotName}"
默认宝石-损坏:
  name: "§7已损坏 §7[§c红宝石§7]"
  # 孔位修复
  repair:
    # 修复后替换成其它孔位
    # 支持表达式随机多孔位,如 ${string.random('红宝石','绿宝石','蓝宝石')}
    slot: "红宝石"
    # 修复成功率
    probability: 1.0
    # 拆卸所需材料
    # 格式:物品库 物品Id 数量
    material:
      - "mm 测试材料 10"
  # 修复条件
  condition:
    - ""
  # 修复后执行动作
  action:
    - ""
  show:
    material: RED_STAINED_GLASS_PANE
    name: "{slotName}"
    lore:
      - "{repair-template}"
    enchants:
      DURABILITY: 1

基础配置

yaml
# 默认物品库
item-library: "mm"
# 载入宝石属性
load-gem-attribute:
  # 属性读取全局条件,需满所有条件
  condition:
    # 判断等级限制
    - "%player_level% >= match.number('等级限制')"
  # 以下满足任意一条即读取宝石属性
  # 以下满足任意一条即读取宝石属性
  # 允许的主手
  mainHand:
    # true 表示允许任意物品读取属性
    - "true"
    - "match.lore('类型: 主手')"
  # 允许的副手
  offHand:
    - "true"
    - "match.lore('类型: 副手')"
  # 背包额外槽位
  extra:
  # 指定槽位,例如 17 号槽位
  #17:
  #  - "match.lore('类型: 饰品')"
template:
  material: "§b▪ §r{name}§f×{amount}"
  # 支持以下变量:
  # 材料: {material}
  # 金币: {money}
  # 点券: {points}
  # 成功率: {probability}
  take:
    - ""
    - "§f拆卸该宝石需要 §e{money} §f金币"
  repair:
    - ""
    - "§f成功率 §e{probability}%"
    - "§f修复孔位需要 §e{money} §f金币"
    - ""
    - "§8-§3材料:"
    - "{material}"
  suit:
    - ""
    - "{content}"
# 插件兼容
compatible:
  YeeJewelry: true
  LyInventory: true
  LegendJewelry: true
  # 适配全版本
  AttributeInventory: true
  # 以下参数均为从指定槽位读取宝石
  # 龙之核心
  DragonCore:
    - "测试槽位"
  # 时装栏
  # 格式:背包.槽位  例如:shizhuang.头部槽
  DragonInventory:
    - "test.armourers1"
  # 萌芽引擎
  GermPlugin:
    - "测试槽位"