Are you an LLM? You can read better optimized documentation at /paid-plugins\lyinventory\config.md for this page in Markdown format
配置说明
LyInventory 的主配置用于控制属性系统、原版背包属性读取、lore 替换、龙核槽位映射、属性倍率、保存、放入拦截和提示文本。
属性插件
yaml
attribute-plugin: "AttributePlus"1
| 值 | 说明 |
|---|---|
AttributePlus | 使用 AttributePlus |
SX-Attribute2 | 使用新版 SX 属性接口 |
SX-Attribute3 | 使用 3.x 属性接口 |
AttributeSystem | 使用 AttributeSystem |
ItemLoreOrigin | 使用 ItemLoreOrigin |
修改属性插件后,建议重启服务器,并使用 /li refreshattr [玩家] 刷新玩家属性。
原版背包属性读取
yaml
load-attribute-form-origin-inventory: []1
该配置用于指定原版背包中哪些槽位参与属性读取。它通常用于需要让普通背包内特定物品也提供属性的服务器。
yaml
load-attribute-form-origin-inventory-condition:
- "permission:example.use"1
2
2
可用条件包括:
| 条件 | 说明 |
|---|---|
papi | PlaceholderAPI 条件 |
permission | 拥有权限 |
nopermission | 没有权限 |
name | 物品名匹配 |
lore | 物品说明匹配 |
nolore | 物品说明不匹配 |
Lore 替换
yaml
lore-replace:
- "原文本->新文本"1
2
2
lore-replace 会在插件处理物品说明时替换指定文本,常用于隐藏绑定标记、整理属性显示或统一旧物品格式。
龙核槽位映射
yaml
dragoncore-slot-mapping-enable: false1
开启后,龙核界面中形如 lyinv_背包id_槽位id 的槽位标识,会映射到插件背包槽位。
该功能适合把插件背包嵌入龙核 GUI。修改后建议重启服务器,避免旧界面缓存影响测试。
属性倍率
yaml
attribute-rate-enable: false
attribute-rate-key: "倍率"1
2
2
开启属性倍率后,插件会读取槽位配置中的 attribute-rate,并按 attribute-rate-key 处理属性数值。
它适合做强化槽、会员槽、职业槽等不同倍率的装备栏。
自动保存
yaml
auto-save-interval: 3001
auto-save-interval 控制背包数据自动保存间隔。背包数据包含玩家放入的物品,不建议设置过长。
放入拦截
yaml
anti-equip-item-lore:
- "不可放入"1
2
2
物品 lore 中包含这里配置的文本时,会被禁止放入插件背包。
全局放入条件
yaml
check-put-on-condition:
- "lore:示例文本<->&c该物品不能放入"1
2
2
check-put-on-condition 是全局放入检测。条件后可使用 <-> 编写失败提示。
MySQL
MySQL 前置要求
只要启用 MySQL 存储,就必须先安装 LyMySQLCore,并确认它已成功连接数据库。LyMySQLCore 未加载或连接失败时,本插件的 MySQL 数据读取、保存、同步或相关记录不会生效。
yaml
mysql:
enable: false
host: "localhost"
port: 3306
database: "minecraft"
user: "root"
password: "123456"1
2
3
4
5
6
7
2
3
4
5
6
7
单服可使用本地保存。需要跨服同步背包数据时,再启用 MySQL。
其他规则
| 配置 | 说明 |
|---|---|
click-cooldown | 背包点击冷却 |
unlock-empty-condition-slot | 是否允许无条件空槽按解锁逻辑处理 |
message | 插件提示文本 |
玩家使用 Shift 左键时,插件会尝试自动匹配可放入槽位;不符合条件的物品会返回玩家背包。