主配置 config.yml
plugins/GTMobDrops/config.yml 控制 GTMobDrops 的全局行为。怪物掉落内容通常写在 drops/、droppools/ 或 MythicMobs 的 GTDrops 中;config.yml 更适合配置开关、性能、属性加成、消息、存储、保护和兼容。
修改配置后执行:
/gtmd reload涉及存储、授权、兼容插件加载顺序的配置,建议完整重启服务器。
基础设置 Settings
Settings:
enabled: true
debug: false
language: "zh_CN"| 字段 | 作用 | 推荐 |
|---|---|---|
enabled | 总开关。关闭后 GTMobDrops 不接管掉落 | 正式环境保持 true |
debug | 输出详细判定日志 | 只在排错时打开 |
language | 语言 | 中文环境保持 zh_CN |
排查掉落问题时可以临时开启:
Settings:
debug: true测试完成后改回 false,避免控制台输出过多。
授权设置 Auth
Auth:
enabled: true
product: "GTMobDrops"
allowMissingGTCore: false| 字段 | 作用 |
|---|---|
enabled | 是否向 GTCore 查询授权状态 |
product | 授权后台中的产品名 |
allowMissingGTCore | 未安装 GTCore 时是否允许启动 |
正式环境保持:
Auth:
enabled: true
product: "GTMobDrops"
allowMissingGTCore: false激活码写在 plugins/GTCore/config.yml,不是写在 GTMobDrops 的配置里。
性能设置 Performance
Performance:
asyncProcessing: true
maxDropsPerTick: 50
cacheEnabled: true
cacheExpireMinutes: 30
cache:
playerAttributeExpire: 60
batchWrite:
enabled: true
batchSize: 100
flushInterval: 5000| 字段 | 作用 | 建议 |
|---|---|---|
asyncProcessing | 耗时操作放到后台线程 | 保持 true |
maxDropsPerTick | 每 tick 最大处理掉落数 | 普通服 50,高并发可降低 |
cacheEnabled | 缓存解析后的掉落配置 | 保持 true |
cacheExpireMinutes | 掉落配置缓存过期时间 | 10~30 分钟 |
playerAttributeExpire | 玩家属性缓存秒数 | 30~60 秒 |
batchWrite.enabled | 批量写入统计和日志 | 保持 true |
batchSize | 每批最大写入数量 | 100 起步 |
flushInterval | 强制刷写间隔,毫秒 | 5000 即 5 秒 |
高并发服务器推荐:
Performance:
asyncProcessing: true
maxDropsPerTick: 30
cacheEnabled: true
cacheExpireMinutes: 30
cache:
playerAttributeExpire: 60
batchWrite:
enabled: true
batchSize: 200
flushInterval: 5000属性加成 AttributeBonus
属性加成用于读取 AttributePlus、CraneAttribute 等属性插件,让玩家身上的属性影响掉落概率、倍率和数量。
AttributeBonus:
enabled: true
dropRateAttribute: "掉落倍率"
dropChanceAttribute: "掉落概率"
dropAmountAttribute: "掉落数量"
maxDropRate: 10.0
maxDropChance: 1.0
maxDropAmount: 100
permissionBonus:
gt.vip: 0.2
gt.svip: 0.5
gt.mvp: 1.0
globalBonus: 0.0| 字段 | 作用 |
|---|---|
dropRateAttribute | 掉落数量倍率属性 |
dropChanceAttribute | 掉落概率加成属性 |
dropAmountAttribute | 掉落固定数量加成属性 |
maxDropRate | 掉落倍率上限 |
maxDropChance | 概率加成上限 |
maxDropAmount | 固定数量加成上限 |
permissionBonus | 权限加成 |
globalBonus | 全局活动加成 |
概率加成是独立额外机会。基础概率已经是 1.0 时,最终仍是 100%。
活动期间全服提高掉率:
AttributeBonus:
enabled: true
globalBonus: 0.5这里表示额外 50% 加成机会,适合周末活动或节日活动。
物品独立加成 ItemBonus
ItemBonus 用于控制某些物品吃哪些加成。
ItemBonus:
pure_luck_token:
ignoreAll: true
legendary_sword:
allowedSources:
- "ca:传说掉率"
- "perm:gt.legend"
no_global_item:
blockedSources:
- "global"| 字段 | 作用 |
|---|---|
ignoreAll | 忽略所有加成,完全按基础概率 |
allowedSources | 只允许列表里的加成来源生效 |
blockedSources | 禁止列表里的加成来源 |
extraSources | 给当前物品额外读取加成 |
conditions | 满足条件后加成才生效 |
加成来源写法:
ca:属性名
ap:属性名
perm:权限节点
global
set:套装ID加成模式 BonusMode
BonusMode:
mode: "D"
modeD:
mergeAmounts: true四种模式:
| 模式 | 说明 | 适合场景 |
|---|---|---|
A | 每次加成命中只额外加 1 个 | 稳定小幅加成 |
B | 每次加成命中额外加基础数量 | 数值膨胀更明显 |
C | 多个加成合并算一次额外掉落 | 保守产出 |
D | 基础和每个加成都独立判定 | RPG 掉落体验,默认推荐 |
modeD.mergeAmounts 控制多次掉落是否合并成一次显示。
希望掉落更整洁,使用 true;希望玩家看到多次判定效果,使用 false。
CA 物品掉率 CARateBoost
CARateBoost 用于 CraneAttribute 的物品级掉率计算。
CARateBoost:
enabled: true
rateCalculation:
preset: "hybrid"
mode: "hybrid"常用预设:
| 预设 | 说明 |
|---|---|
add | 所有加成直接相加 |
multiply | 所有加成相乘 |
hybrid | 增益加法,降低乘法,默认推荐 |
weighted | 不同来源使用不同权重 |
custom | 自定义公式 |
多数服务器使用默认 hybrid 即可。
套装暗改 SetDarkDrop
SetDarkDrop:
enabled: true
order: "bonus_first"| 字段 | 作用 |
|---|---|
enabled | 是否启用套装暗改 |
order | 套装独立加成和暗改的计算顺序 |
可选顺序:
bonus_first 先算 bonusRate,再算暗改
dark_first 先算暗改,再算 bonusRate套装本身写在 sets/ 目录或旧版 sets.yml 中。
多彩掉落 FancyDrop
FancyDrop:
enabled: true
offsetX: 0.5
offsetY: 1.0
offsetZ: 0.5
angleType: "random"
despawnTime: 300| 字段 | 作用 |
|---|---|
enabled | 是否启用掉落视觉效果 |
offsetX/Y/Z | 掉落位置偏移 |
angleType | 掉落排列方式 |
despawnTime | 掉落物存活秒数,-1 表示原版行为 |
angleType:
random 随机散落
round 环形排列大量掉落场景可关闭:
FancyDrop:
enabled: false掉落消息 Messages
Messages:
enabled: true
prefix: "&8[&6掉落&8] "
dropMessage: "&7你获得了 &e{item} &7x{amount}"
rareDropMessage: "&7你获得了 &6&l稀有 &e{item} &7x{amount}"
rareThreshold: 0.1变量:
{player} 玩家名
{item} 物品显示名
{amount} 数量
{mob} 怪物名rareThreshold: 0.1 表示概率小于等于 10% 的掉落按稀有消息显示。
掉落动作 DropActions
DropActions 用于按稀有度执行标题、音效、广播、命令等动作。
DropActions:
enabled: true
rarities:
legendary:
threshold: 0.01
actions:
- type: "broadcast"
message: "&6{player} 获得了传说掉落 {item}"
- type: "sound"
target: "player"
sound: "ENTITY_PLAYER_LEVELUP"
volume: 1.0
pitch: 1.2常用动作:
| 类型 | 用途 |
|---|---|
message | 给玩家发消息 |
broadcast | 广播 |
sound | 播放声音 |
title | 屏幕标题 |
actionbar | 动作栏 |
particle | 粒子 |
command | 执行命令 |
delay | 延迟 |
condition | 条件动作 |
动作文本支持 PAPI 变量和 {player}、{item}、{amount}、{chance} 等内置变量。
物品限流 DropLimit
DropLimit:
enabled: true
default:
global: -1
personal: -1
time: "1D"
limits:
"ni:legend_sword":
global: 10
personal: 1
time: "1W"| 字段 | 作用 |
|---|---|
global | 全服限制,-1 为无限制 |
personal | 单玩家限制,-1 为无限制 |
time | 重置周期 |
时间格式:
1D 1 天
1W 1 周
2W3D 2 周 3 天
1Y6M 1 年 6 月适合控制传说装备、活动限定物品、赛季材料产出。
存储系统 Storage
Storage:
mode: "local"
skydrop: {}
mysql: {}| 模式 | 说明 |
|---|---|
local | 本地 SkyDrop 存储,单服推荐 |
mysql | MySQL 存储,多服共享数据 |
单服使用:
Storage:
mode: "local"多服共享掉落记录:
Storage:
mode: "mysql"
mysql:
host: "127.0.0.1"
port: 3306
database: "gtmobdrops"
username: "root"
password: "password"切换存储模式后重启服务器。
统计与日志 PlayerStats / Log / DropLog
PlayerStats:
enabled: true
recentDropLimit: 50
rankRefreshInterval: 300
cacheFlushInterval: 30PlayerStats 用于玩家统计、最近掉落、排行和 PAPI 数据。
Log:
enabled: true
compressInterval: 1440
keepDays: 30
logToConsole: falseLog 会记录详细掉落日志,适合追溯问题。
DropLog:
enabled: true
threshold: 0.1
retentionDays: 30
logToConsole: falseDropLog 是旧版审计日志,主要记录低概率掉落。threshold: 0.1 表示记录 10% 及以下的掉落。
兼容性 Compatibility
Compatibility:
NeigeItems:
enabled: true
asyncFetch: true
MythicMobs:
enabled: true
inheritVanillaDrops: true
CraneAttribute:
enabled: true
AttributePlus:
enabled: true| 配置 | 作用 |
|---|---|
NeigeItems.enabled | 是否接入 NI 物品库 |
NeigeItems.asyncFetch | 异步获取 NI 物品,降低主线程压力 |
MythicMobs.enabled | 是否读取 MM 怪物和物品 |
inheritVanillaDrops | 是否保留 MM/原版原有掉落 |
CraneAttribute.enabled | 是否读取 CA 属性 |
AttributePlus.enabled | 是否读取 AP 属性 |
如果某个生态插件没有安装,对应开关保持 true 一般也不会影响启动;需要排查时可临时关闭。
安全设置 Security
Security:
enabled: true
commandSecurity:
whitelistMode: false
blockedCommands:
- "op"
- "deop"
- "stop"
- "reload"掉落动作可以执行命令,因此安全配置非常重要。
默认模式会拦截危险命令,防止配置错误导致玩家间接执行高危操作。
需要更严格时开启白名单:
Security:
enabled: true
commandSecurity:
whitelistMode: true
allowedCommands:
- "give"
- "broadcast"
- "tell"
- "playsound"物品保护 ItemProtection
ItemProtection:
enabled: true
protection-time: 0
allow-anyone-after-timeout: false
allow-anyone-if-no-killer: true| 字段 | 作用 |
|---|---|
enabled | 是否启用掉落归属保护 |
protection-time | 保护秒数,0 表示直到被拾取 |
allow-anyone-after-timeout | 超时后是否允许任何人拾取 |
allow-anyone-if-no-killer | 没有击杀者时是否允许拾取 |
副本服推荐保护永久:
ItemProtection:
enabled: true
protection-time: 0
allow-anyone-after-timeout: false野外服想让掉落过一段时间可抢:
ItemProtection:
enabled: true
protection-time: 30
allow-anyone-after-timeout: true物品显示 ItemDisplay
ItemDisplay:
enabled: true
format: "{item-name} §6[§a{killer}§6] §fx {amount} §c{countdown}s"
show-amount-only-when-stacked: true可用变量:
{item-name}
{killer}
{killer_uuid}
{amount}
{countdown}NI 物品会优先使用 NI 的显示名系统,此配置主要影响非 NI 物品。
AdyeshachDisplay
AdyeshachDisplay:
enabled: true
view-distance: 64.0
update-interval: 10用于掉落物名称虚拟显示。
| 字段 | 作用 |
|---|---|
view-distance | 可视距离 |
update-interval | 跟随与清理检查间隔,20 tick = 1 秒 |
数值越低越顺滑,数值越高越省性能。普通服使用 10 即可。
CloudPick
CloudPick:
enabled: false
dropPush:
enabled: false
identifier: "gtmobdrops_drop"用于云拾 UI 展示怪物掉落预览和掉落推送。没有云拾时保持关闭。
PAPI 变量格式:
%gtmobdrops_cp_怪物名_序号_属性%属性支持:
id, name, ni, amount, chance, rarity, type, material, item修改后验证
推荐流程:
/gtmd reload
/gtmd info
/gtmd preview ZOMBIE 200如果涉及 MySQL、存储模式、授权、软依赖开关,执行完整重启。
如果只是消息、掉落动作、概率阈值、显示格式,通常重载即可。
