?️ Dcombat — 完整维基
一款面向 Paper 和 Folia 服务器的强大战斗插件。标记战斗中的玩家、惩罚挂机者、控制掉落物、限制技能、渲染视觉边界,并与您现有的服务器堆栈集成——所有配置仅需一个文件即可完成。
? 目录
? 需求与安装
需求
| 需求 |
详情 |
| Java |
21 或更高版本 |
| 服务器 |
Paper 或 Folia — API 1.19+ |
| PacketEvents |
⚠️ 必需 — 必须安装 |
可选集成(插件在没有这些插件的情况下也能正常运行):
安装
- 下载 Dcombat 并将 jar 包放入
plugins/ 文件夹。
- 安装 PacketEvents 以及您想要的任何可选插件。
- 启动服务器 ——
plugins/Dcombat/config.yml 和一份 wiki.txt 参考文档将自动生成。
- 根据需要编辑
config.yml。
- 运行
/dcombat reload 以应用更改而无需重启服务器。
⌨️ 命令与权限
所有命令均使用根标签 /combatlog(别名:/combat)。
管理员命令
| 命令 |
权限 |
描述 |
/combatlog reload |
dcombat.reload |
重新加载配置 |
/combatlog status <player> |
dcombat.status |
检查玩家是否处于战斗标记状态 |
/combatlog tag <player> |
dcombat.tag |
手动标记一名玩家 |
/combatlog tag <player1> <player2> |
dcombat.tag |
互相标记两名玩家,使彼此进入战斗状态 |
/combatlog untag <player> |
dcombat.untag |
移除玩家的战斗标记 |
/combatlog untagall |
dcombat.untagall |
移除所有活跃的战斗标记 |
/combatlog stats |
dcombat.stats |
显示当前处于战斗状态的玩家数量 |
解除标记命令
解除标记(Tag-out)授予玩家暂时免疫被战斗标记的能力。
| 命令 |
权限 |
描述 |
/tagout <duration> |
dcombat.tagout |
为自己授予解除标记的免疫时间 |
/tagout <player> <duration> |
dcombat.tagout |
为其他玩家授予解除标记的免疫时间 |
/tagout remove |
dcombat.tagout |
移除自己的解除标记免疫 |
/tagout remove <player> |
dcombat.tagout |
移除其他玩家的解除标记免疫 |
别名: /tagout 也可以用作 /tagimmunity
绕过权限
| 权限 |
效果 |
dcombat.bypass.admin |
玩家永远不会被战斗标记(需在配置中设置 excludeAdminsFromCombat: true) |
⚙️ 配置参考
修改配置后,请运行 /combatlog reload。一份 wiki.txt 快速参考也会自动写入插件的数据文件夹。
1️⃣ 设置
settings:
notifyAboutUpdates: true
combatTimerDuration: 20s
ignoredWorlds:
- your_world
| 键 |
类型 |
默认值 |
描述 |
notifyAboutUpdates |
boolean |
true |
当有新版本可用时通知服务器操作员 |
combatTimerDuration |
Duration |
20s |
玩家最后一次进行 PvP 互动后保持标记状态的时间长度。格式:15s, 1m, 1h |
ignoredWorlds |
list |
[your_world] |
完全禁用战斗标记的世界列表 |
2️⃣ 末影珍珠设置
pearl:
pearlThrowDamageEnabled: true
pearlThrowDisabledDuringCombat: true
pearlCooldownEnabled: false
pearlExtendsCombatTag: false
pearlThrowDelay: 3s
| 键 |
类型 |
默认值 |
描述 |
pearlThrowDamageEnabled |
boolean |
true |
末影珍珠落地时对投掷者造成伤害 |
pearlThrowDisabledDuringCombat |
boolean |
true |
在战斗期间阻止投掷末影珍珠 |
pearlCooldownEnabled |
boolean |
false |
启用投掷末影珍珠之间的冷却时间 |
pearlExtendsCombatTag |
boolean |
false |
在战斗期间投掷末影珍珠会重置计时器 |
pearlThrowDelay |
Duration |
3s |
投掷之间的冷却时长(当 pearlCooldownEnabled: true 时生效) |
3️⃣ 三叉戟设置
trident:
tridentRiptideDisabledDuringCombat: false
tridentRiptideExtendsCombatTag: false
tridentRiptideDelay: 10s
| 键 |
类型 |
默认值 |
描述 |
tridentRiptideDisabledDuringCombat |
boolean |
false |
在战斗期间禁止使用激流附魔 |
tridentRiptideExtendsCombatTag |
boolean |
false |
在战斗中使用激流会重置计时器 |
tridentRiptideDelay |
Duration |
10s |
两次激流使用之间的冷却时间 |
4️⃣ 效果设置
effect:
customEffectsEnabled: false
customEffects:
SPEED: 1
RESISTANCE: 0
| 键 |
类型 |
默认值 |
描述 |
customEffectsEnabled |
boolean |
false |
在玩家处于战斗状态时施加药水效果 |
customEffects |
map |
SPEED:1, RESISTANCE:0 |
PotionEffectType → 等级强度。等级强度 0 = I 级,1 = II 级,以此类推 |
5️⃣ 死亡设置
控制玩家死亡时触发的视觉效果。
death:
lightning:
afterEveryDeath: false
inCombat: true
firework:
afterEveryDeath: false
inCombat: false
power: 2
fireworkType: BALL
primaryColor: "#a80022"
fadeColor: "#0a0a0a"
particlesEnabled: true
mainParticle: CAMPFIRE_COSY_SMOKE
mainParticleCount: 3
secondaryParticle: SMALL_FLAME
secondaryParticleCount: 3
⚡ 闪电
| 键 |
类型 |
默认值 |
描述 |
lightning.afterEveryDeath |
boolean |
false |
每次玩家死亡时都召唤闪电 |
lightning.inCombat |
boolean |
true |
仅在战斗死亡时召唤闪电 |
? 烟花
| 键 |
类型 |
默认值 |
描述 |
firework.afterEveryDeath |
boolean |
false |
每次玩家死亡时都生成烟花 |
firework.inCombat |
boolean |
false |
仅在战斗死亡时生成烟花 |
firework.power |
int |
2 |
烟花飞行力量 / 持续时间 |
firework.fireworkType |
FireworkEffect.Type |
BALL |
形状:BALL(球)、BALL_LARGE(大球)、STAR(星星)、CREEPER(爬行者)、BURST(爆裂) |
firework.primaryColor |
hex |
#a80022 |
爆炸主色 |
firework.fadeColor |
hex |
#0a0a0a |
消散颜色 |
firework.particlesEnabled |
boolean |
true |
在烟花周围发射环境粒子效果 |
firework.mainParticle |
XParticle |
CAMPFIRE_COSY_SMOKE |
主要粒子类型 |
firework.mainParticleCount |
int |
3 |
每刻的主要粒子数量 |
firework.secondaryParticle |
XParticle |
SMALL_FLAME |
次要粒子类型 |
firework.secondaryParticleCount |
int |
3 |
每刻的次要粒子数量 |
6️⃣ 掉落设置
控制玩家在战斗死亡时背包物品的处理方式。
drop:
dropEventPriority: NORMAL
dropType: UNCHANGED
dropItemPercent: 100
playersHealthPercentClamp: 20
affectExperience: false
| 键 |
类型 |
默认值 |
描述 |
dropEventPriority |
EventPriority |
NORMAL |
掉落处理器的 Bukkit 事件优先级 |
dropType |
enum |
UNCHANGED |
掉落行为模式(见下表) |
dropItemPercent |
int |
100 |
当 dropType: PERCENT 时,受害者保留的物品百分比。数值越低,掉落的物品越多 |
playersHealthPercentClamp |
int |
20 |
在 PLAYERS_HEALTH 模式下始终保留的最小物品百分比 — 防止完全丢失所有物品 |
affectExperience |
boolean |
false |
也将掉落修改应用于经验球 |
dropType 选项:
| 值 |
行为 |
UNCHANGED |
原版掉落行为 — 无更改 |
PERCENT |
固定百分比的物品被掉落,由 dropItemPercent 设定 |
PLAYERS_HEALTH |
掉落百分比随受害者剩余生命值变化,并通过 playersHealthPercentClamp 进行限制 |
7️⃣ 击退设置
knockback:
multiplier: 1.0
vertical: 0.2
forceTeleport:
delay: 1s
unsafeGroundBlocks: []
airBlocks: []
| 键 |
类型 |
默认值 |
描述 |
multiplier |
double |
1.0 |
全局击退强度倍数 |
vertical |
double |
0.2 |
垂直击退分量 |
forceTeleport.delay |
Duration |
1s |
将玩家击退至危险区域附近后,安全传送检查触发前的延迟 |
forceTeleport.unsafeGroundBlocks |
list of XMaterial |
[] |
被视为不适合着陆的方块类型 |
forceTeleport.airBlocks |
list of XMaterial |
[] |
被视为空气的方块类型(也会触发安全传送) |
8️⃣ 边界设置
在玩家处于战斗状态时围绕玩家渲染的视觉边界。
border:
distance: 6.5
block:
# 基于方块的边界动画选项
particle:
# 基于粒子的边界动画选项
| 键 |
类型 |
默认值 |
描述 |
distance |
double |
6.5 |
渲染边界距离玩家的距离 |
block |
section |
— |
基于方块的边界动画配置 |
particle |
section |
— |
基于粒子的边界动画配置 |
9️⃣ 放置方块设置
blockPlacement:
disableBlockPlacing: true
blockPlacementMode: ABOVE
blockPlacementModeDisplayName: "above"
blockPlacementYCoordinate: 40
restrictedBlockTypes: []
| 键 |
类型 |
默认值 |
描述 |
disableBlockPlacing |
boolean |
true |
在战斗期间禁止放置方块 |
blockPlacementMode |
enum |
ABOVE |
ABOVE — 无法在 Y 限制上方放置。BELOW — 无法在 Y 限制下方放置 |
blockPlacementModeDisplayName |
string |
above |
当前模式在消息中显示的名称 |
blockPlacementYCoordinate |
int |
40 |
用作边界的 Y 轴坐标 |
restrictedBlockTypes |
list of Material |
[] |
无论 Y 轴高度如何,在战斗期间永远不能放置的具体材料 |
? 水晶 PvP 设置
crystalPvp:
tagFromCrystals: true
tagFromRespawnAnchor: true
| 键 |
类型 |
默认值 |
描述 |
tagFromCrystals |
boolean |
true |
末影水晶爆炸会标记放置/触发它的玩家 |
tagFromRespawnAnchor |
boolean |
true |
重生锚爆炸会标记责任玩家 |
? 命令设置
command:
commandRestrictionMode: BLACKLIST
restrictedCommands:
- spawn
- home
| 键 |
类型 |
默认值 |
描述 |
commandRestrictionMode |
enum |
BLACKLIST |
BLACKLIST — 除列出的命令外,所有命令均允许。WHITELIST — 仅允许列出的命令 |
restrictedCommands |
list |
[] |
需要限制使用的命令。请勿包含前导 / |
?️ 管理员设置
admin:
excludeAdminsFromCombat: false
excludeCreativePlayersFromCombat: false
| 键 |
类型 |
默认值 |
描述 |
excludeAdminsFromCombat |
boolean |
false |
拥有 dcombat.bypass.admin 权限的玩家永远不会被标记 |
excludeCreativePlayersFromCombat |
boolean |
false |
处于创造模式的玩家永远不会被标记 |
?️ 区域设置
需要安装 WorldGuard。
region:
blockedRegions:
- your_region
preventPvpInRegions: true
restrictedRegionRadius: 10
| 键 |
类型 |
默认值 |
描述 |
blockedRegions |
list |
[your_region] |
禁用战斗标记的 WorldGuard 区域名称 |
preventPvpInRegions |
boolean |
true |
防止在受保护区域内开始 PvP |
restrictedRegionRadius |
int |
10 |
受保护区域周围也禁止战斗的范围(以方块为单位) |
⚔️ 战斗设置
combat:
releaseAttackerOnVictimDeath: true
disableElytraUsage: true
disableElytraOnDamage: true
disableFlying: true
unequipElytraOnCombat: true
disableFireworks: true
enableDamageCauseLogging: false
damageCauseRestrictionMode: WHITELIST
loggedDamageCauses: []
ignoredProjectileTypes:
- ENDER_PEARL
- EGG
quitPunishmentEventPriority: NORMAL
whitelistedKickReasons: []
| 键 |
类型 |
默认值 |
描述 |
releaseAttackerOnVictimDeath |
boolean |
true |
当受害者死亡时,攻击者也会被解除标记 |
disableElytraUsage |
boolean |
true |
战斗中禁止使用鞘翅 |
disableElytraOnDamage |
boolean |
true |
玩家受到伤害时取消鞘翅滑翔 |
disableFlying |
boolean |
true |
战斗中禁用 /fly 飞行模式 |
unequipElytraOnCombat |
boolean |
true |
进入战斗状态时强制卸下胸甲槽位的物品 |
disableFireworks |
boolean |
true |
战斗中禁止使用烟花火箭 |
enableDamageCauseLogging |
boolean |
false |
将每种伤害原因记录到控制台(有助于调试标记触发条件) |
damageCauseRestrictionMode |
enum |
WHITELIST |
WHITELIST — 仅列出的伤害原因会触发标记。BLACKLIST — 除列出的伤害原因外,其他所有原因都会触发标记 |
loggedDamageCauses |
list of DamageCause |
[] |
受限制模式影响的伤害原因列表 |
ignoredProjectileTypes |
list of EntityType |
ENDER_PEARL, EGG |
不会触发战斗标记的投射物类型 |
quitPunishmentEventPriority |
EventPriority |
NORMAL |
登出惩罚处理程序的事件优先级 |
whitelistedKickReasons |
list |
[] |
不会被视作战斗状态下登出的服务器踢出消息 |
? 库存设置
inventory:
inventoryAccessMode: ALLOW_ALL
restrictedInventoryTypes:
- CHEST
- ENDER_CHEST
| 键 |
类型 |
默认值 |
描述 |
inventoryAccessMode |
enum |
ALLOW_ALL |
ALLOW_ALL — 玩家可以打开任何容器。RESTRICT — 某些容器会被阻止访问 |
restrictedInventoryTypes |
list of InventoryType |
[] |
在 RESTRICT 模式下被阻止访问的容器类型(例如 CHEST、ENDER_CHEST、BARREL、SHULKER_BOX) |
? 占位符设置
placeholders:
isInCombatFormattedTrue: "In Combat"
isInCombatFormattedFalse: "Not In Combat"
| 键 |
类型 |
默认值 |
描述 |
isInCombatFormattedTrue |
string |
In Combat |
当玩家被标记时,%dcombat_isInCombat_formatted% 返回的文本 |
isInCombatFormattedFalse |
string |
Not In Combat |
当玩家未被标记时,%dcombat_isInCombat_formatted% 返回的文本 |
? 消息设置
所有消息均使用 MiniMessage 格式,并可发送至聊天栏、动作栏、标题或播放音效。
可用占位符:
| 占位符 |
描述 |
{PLAYER} |
目标玩家的名称 |
{TIME} |
持续时间数值 |
{PERMISSION} |
缺失的权限节点 |
{USAGE} |
正确的命令用法 |
{Y} |
Y 轴坐标等级 |
{MODE} |
方块放置模式名称 |
{COUNT} |
玩家数量 |
{FIRST_PLAYER} |
双重标记中的第一名玩家 |
{SECOND_PLAYER} |
双重标记中的第二名玩家 |
消息键:
| 键 |
触发时机 |
onlyForPlayers |
控制台使用了仅限玩家执行的命令 |
adminTagPlayer |
管理员标记单个玩家 |
adminTagMultiplePlayers |
管理员相互标记两名玩家 |
adminUntagPlayer |
管理员取消对某玩家的标记 |
adminUntagAll |
管理员取消对所有玩家的标记 |
adminPlayerNotInCombat |
目标未被战斗标记 |
playerInCombat |
状态检查 — 玩家已被标记 |
playerNotInCombat |
状态检查 — 玩家未被标记 |
adminCannotTagSelf |
管理员尝试在双重标记中包含自己 |
adminTagOutSelf |
管理员为自己授予免标记豁免权 |
adminTagOut |
管理员为玩家授予免标记豁免权 |
playerTagOut |
发送给获得豁免权的玩家 |
adminTagOutOff |
管理员移除玩家的免标记豁免权 |
playerTagOutOff |
发送给其豁免权被移除的玩家 |
adminTagOutCanceled |
因目标拥有豁免权,标记命令被阻止 |
combatStats |
/combatlog stats 命令的响应 |
❤️ Lifesteal 设置
需要安装 LifestealCore。
lifesteal:
enabled: false
heartsToSteal: 1
stealOnlyInCombat: true
stealOnKill: true
stealOnDeath: false
eliminateOnZeroHearts: true
notifyOnKill: true
| 键 |
类型 |
默认值 |
描述 |
enabled |
boolean |
false |
LifestealCore 集成的总开关 |
heartsToSteal |
int |
1 |
死亡时从受害者转移给击杀者的生命值数量 |
stealOnlyInCombat |
boolean |
true |
仅当至少一方处于战斗标记状态时才窃取生命值 |
stealOnKill |
boolean |
true |
击杀者获得生命值 |
stealOnDeath |
boolean |
false |
无论 stealOnKill 设置如何,受害者在死亡时失去生命值 |
eliminateOnZeroHearts |
boolean |
true |
当受害者的生命值归零时,将其淘汰(由 LifestealCore 执行封禁) |
notifyOnKill |
boolean |
true |
窃取生命值时发送聊天通知 |
? PlaceholderAPI
需要安装 PlaceholderAPI。标识符为 dcombat。
| 占位符 |
返回值 |
%dcombat_isInCombat% |
true 或 false |
%dcombat_isInCombat_formatted% |
你配置的 isInCombatFormattedTrue / isInCombatFormattedFalse 字符串 |
%dcombat_remaining_seconds% |
战斗计时器剩余的秒数(未标记时空白) |
%dcombat_remaining_millis% |
战斗计时器剩余的毫秒数(未标记时空白) |
%dcombat_opponent% |
标记该玩家的对手名称(未标记时空白) |
%dcombat_opponent_health% |
对手的当前生命值,保留两位小数(未标记时空白) |
? 开发者 API
Dcombat 向其他插件暴露了 DcombatApi 接口。
DcombatApi api = DcombatProvider.get();
FightManager fightManager = api.getFightManager();
RegionProvider regions = api.getRegionProvider();
PearlService pearls = api.getFightPearlService();
FightTagOutService tagOut = api.getFightTagOutService();
FightEffectService effects = api.getFightEffectService();
DropService drops = api.getDropService();
DropKeepInventoryService keepInv = api.getDropKeepInventoryService();
事件
FightTagEvent — 当玩家被战斗标记时触发 (可取消)
@EventHandler
public void onTag(FightTagEvent event) {
UUID player = event.getPlayer();
CauseOfTag cause = event.getCause(); // PVP, COMMAND, etc.
event.setCancelled(true); // 阻止标记
}
FightUntagEvent — 当玩家的战斗标记被移除时触发 (可取消)
@EventHandler
public void onUntag(FightUntagEvent event) {
UUID player = event.getPlayer();
CauseOfUnTag cause = event.getCause(); // DEATH, TIMER, COMMAND, etc.
}
BorderShowAsyncEvent / BorderHideAsyncEvent
当玩家的视觉战斗边界显示或隐藏时异步触发。
? 插件集成
| 插件 |
状态 |
启用功能 |
| PacketEvents |
⚠️ 必需 |
数据包层面的鞘翅禁用、飞行控制、边界渲染 |
| PlaceholderAPI |
可选 |
%dcombat_*% 占位符扩展 |
| WorldGuard |
可选 |
blockedRegions 和 restrictedRegionRadius 功能 |
| Lands |
可选 |
领地边界用作战斗安全区 |
| Vault |
可选 |
经济系统集成钩子 |
| LifestealCore |
可选 |
战斗击杀时的生命值窃取 |
? 许可证
版权所有 (c) 2026 Devamy。保留所有权利。
本项目为专有源代码。未经版权持有人事先书面许可,不得复制、修改、分发、出售、转授许可或将此代码声称是他人的作品。
?️ Dcombat — Complete Wiki
A powerful combat plugin for Paper and Folia servers. Combat tag players, punish loggers, control drops, restrict abilities, render visual borders, and integrate with your existing server stack — all from a single config file.
? Table of Contents
? Requirements & Installation
Requirements
| Requirement |
Details |
| Java |
21 or newer |
| Server |
Paper or Folia — API 1.19+ |
| PacketEvents |
⚠️ Required — must be installed |
Optional integrations (the plugin loads fine without these):
Installation
- Download Dcombat and drop the jar into your
plugins/ folder.
- Install PacketEvents and any optional plugins you want.
- Start the server —
plugins/Dcombat/config.yml and a wiki.txt reference will be generated automatically.
- Edit
config.yml to your liking.
- Run
/dcombat reload to apply changes without a restart.
⌨️ Commands & Permissions
All commands use the root label /combatlog (alias: /combat).
Admin Commands
| Command |
Permission |
Description |
/combatlog reload |
dcombat.reload |
Reload the configuration |
/combatlog status <player> |
dcombat.status |
Check if a player is combat-tagged |
/combatlog tag <player> |
dcombat.tag |
Manually tag a player |
/combatlog tag <player1> <player2> |
dcombat.tag |
Mutually tag two players against each other |
/combatlog untag <player> |
dcombat.untag |
Remove a player's combat tag |
/combatlog untagall |
dcombat.untagall |
Remove all active combat tags |
/combatlog stats |
dcombat.stats |
Show how many players are currently in combat |
Tag-Out Commands
Tag-out grants a player temporary immunity from being combat-tagged.
| Command |
Permission |
Description |
/tagout <duration> |
dcombat.tagout |
Grant yourself tag-out immunity |
/tagout <player> <duration> |
dcombat.tagout |
Grant another player tag-out immunity |
/tagout remove |
dcombat.tagout |
Remove your own tag-out immunity |
/tagout remove <player> |
dcombat.tagout |
Remove another player's tag-out immunity |
Alias: /tagout can also be used as /tagimmunity
Bypass Permission
| Permission |
Effect |
dcombat.bypass.admin |
Player can never be combat-tagged (requires excludeAdminsFromCombat: true in config) |
⚙️ Configuration Reference
After making changes, run /combatlog reload. A wiki.txt quick-reference is also written to the plugin's data folder automatically.
1️⃣ Settings
settings:
notifyAboutUpdates: true
combatTimerDuration: 20s
ignoredWorlds:
- your_world
| Key |
Type |
Default |
Description |
notifyAboutUpdates |
boolean |
true |
Notify server operators when a new version is available |
combatTimerDuration |
Duration |
20s |
How long a player stays tagged after their last PvP interaction. Format: 15s, 1m, 1h |
ignoredWorlds |
list |
[your_world] |
Worlds where combat tagging is completely disabled |
2️⃣ Pearl Settings
pearl:
pearlThrowDamageEnabled: true
pearlThrowDisabledDuringCombat: true
pearlCooldownEnabled: false
pearlExtendsCombatTag: false
pearlThrowDelay: 3s
| Key |
Type |
Default |
Description |
pearlThrowDamageEnabled |
boolean |
true |
Ender pearl landing deals damage to the thrower |
pearlThrowDisabledDuringCombat |
boolean |
true |
Block pearl throws while in combat |
pearlCooldownEnabled |
boolean |
false |
Enable a cooldown between pearl throws |
pearlExtendsCombatTag |
boolean |
false |
Throwing a pearl during combat resets the timer |
pearlThrowDelay |
Duration |
3s |
Cooldown length between throws (when pearlCooldownEnabled: true) |
3️⃣ Trident Settings
trident:
tridentRiptideDisabledDuringCombat: false
tridentRiptideExtendsCombatTag: false
tridentRiptideDelay: 10s
| Key |
Type |
Default |
Description |
tridentRiptideDisabledDuringCombat |
boolean |
false |
Block riptide while in combat |
tridentRiptideExtendsCombatTag |
boolean |
false |
Using riptide during combat resets the timer |
tridentRiptideDelay |
Duration |
10s |
Cooldown between riptide uses |
4️⃣ Effect Settings
effect:
customEffectsEnabled: false
customEffects:
SPEED: 1
RESISTANCE: 0
| Key |
Type |
Default |
Description |
customEffectsEnabled |
boolean |
false |
Apply potion effects to players while they are in combat |
customEffects |
map |
SPEED:1, RESISTANCE:0 |
PotionEffectType → amplifier. Amplifier 0 = Level I, 1 = Level II, etc. |
5️⃣ Death Settings
Controls visual effects triggered on player death.
death:
lightning:
afterEveryDeath: false
inCombat: true
firework:
afterEveryDeath: false
inCombat: false
power: 2
fireworkType: BALL
primaryColor: "#a80022"
fadeColor: "#0a0a0a"
particlesEnabled: true
mainParticle: CAMPFIRE_COSY_SMOKE
mainParticleCount: 3
secondaryParticle: SMALL_FLAME
secondaryParticleCount: 3
⚡ Lightning
| Key |
Type |
Default |
Description |
lightning.afterEveryDeath |
boolean |
false |
Strike lightning on every player death |
lightning.inCombat |
boolean |
true |
Strike lightning only on combat deaths |
? Firework
| Key |
Type |
Default |
Description |
firework.afterEveryDeath |
boolean |
false |
Spawn a firework on every player death |
firework.inCombat |
boolean |
false |
Spawn a firework only on combat deaths |
firework.power |
int |
2 |
Firework flight power / duration |
firework.fireworkType |
FireworkEffect.Type |
BALL |
Shape: BALL, BALL_LARGE, STAR, CREEPER, BURST |
firework.primaryColor |
hex |
#a80022 |
Primary explosion color |
firework.fadeColor |
hex |
#0a0a0a |
Fade-out color |
firework.particlesEnabled |
boolean |
true |
Emit ambient particles alongside the firework |
firework.mainParticle |
XParticle |
CAMPFIRE_COSY_SMOKE |
Primary particle type |
firework.mainParticleCount |
int |
3 |
Primary particles per tick |
firework.secondaryParticle |
XParticle |
SMALL_FLAME |
Secondary particle type |
firework.secondaryParticleCount |
int |
3 |
Secondary particles per tick |
6️⃣ Drop Settings
Controls how a player's inventory is handled when they die during combat.
drop:
dropEventPriority: NORMAL
dropType: UNCHANGED
dropItemPercent: 100
playersHealthPercentClamp: 20
affectExperience: false
| Key |
Type |
Default |
Description |
dropEventPriority |
EventPriority |
NORMAL |
Bukkit priority for the drop handler |
dropType |
enum |
UNCHANGED |
Drop behavior mode (see table below) |
dropItemPercent |
int |
100 |
% of items the victim keeps when dropType: PERCENT. Lower = more items dropped |
playersHealthPercentClamp |
int |
20 |
Minimum % of items always kept in PLAYERS_HEALTH mode — prevents full inventory loss |
affectExperience |
boolean |
false |
Apply the drop modifier to experience orbs as well |
dropType options:
| Value |
Behavior |
UNCHANGED |
Vanilla drop behavior — no changes |
PERCENT |
A fixed % of items are dropped, set by dropItemPercent |
PLAYERS_HEALTH |
Drop % scales with the victim's remaining health, clamped by playersHealthPercentClamp |
7️⃣ Knockback Settings
knockback:
multiplier: 1.0
vertical: 0.2
forceTeleport:
delay: 1s
unsafeGroundBlocks: []
airBlocks: []
| Key |
Type |
Default |
Description |
multiplier |
double |
1.0 |
Global knockback strength multiplier |
vertical |
double |
0.2 |
Vertical knockback component |
forceTeleport.delay |
Duration |
1s |
Delay before a safe-teleport check fires after knocking a player near an unsafe area |
forceTeleport.unsafeGroundBlocks |
list of XMaterial |
[] |
Block types considered unsafe to land on |
forceTeleport.airBlocks |
list of XMaterial |
[] |
Block types treated as air (also triggers safe-teleport) |
8️⃣ Border Settings
A visual border rendered around the player while they are in combat.
border:
distance: 6.5
block:
# block-based border animation options
particle:
# particle-based border animation options
| Key |
Type |
Default |
Description |
distance |
double |
6.5 |
Distance from the player where the border is rendered |
block |
section |
— |
Configuration for the block-based border animation |
particle |
section |
— |
Configuration for the particle-based border animation |
9️⃣ Block Placement Settings
blockPlacement:
disableBlockPlacing: true
blockPlacementMode: ABOVE
blockPlacementModeDisplayName: "above"
blockPlacementYCoordinate: 40
restrictedBlockTypes: []
| Key |
Type |
Default |
Description |
disableBlockPlacing |
boolean |
true |
Prevent block placement while in combat |
blockPlacementMode |
enum |
ABOVE |
ABOVE — cannot place above the Y limit. BELOW — cannot place below the Y limit |
blockPlacementModeDisplayName |
string |
above |
Display name shown in messages for the current mode |
blockPlacementYCoordinate |
int |
40 |
The Y-level used as the boundary |
restrictedBlockTypes |
list of Material |
[] |
Specific materials that can never be placed during combat, regardless of Y level |
? Crystal PvP Settings
crystalPvp:
tagFromCrystals: true
tagFromRespawnAnchor: true
| Key |
Type |
Default |
Description |
tagFromCrystals |
boolean |
true |
End crystal explosions tag the player who placed/triggered them |
tagFromRespawnAnchor |
boolean |
true |
Respawn anchor explosions tag the responsible player |
? Command Settings
command:
commandRestrictionMode: BLACKLIST
restrictedCommands:
- spawn
- home
| Key |
Type |
Default |
Description |
commandRestrictionMode |
enum |
BLACKLIST |
BLACKLIST — all commands allowed except listed. WHITELIST — only listed commands are allowed |
restrictedCommands |
list |
[] |
Commands to restrict. Do not include the leading / |
?️ Admin Settings
admin:
excludeAdminsFromCombat: false
excludeCreativePlayersFromCombat: false
| Key |
Type |
Default |
Description |
excludeAdminsFromCombat |
boolean |
false |
Players with dcombat.bypass.admin are never tagged |
excludeCreativePlayersFromCombat |
boolean |
false |
Players in Creative mode are never tagged |
?️ Region Settings
Requires WorldGuard to be installed.
region:
blockedRegions:
- your_region
preventPvpInRegions: true
restrictedRegionRadius: 10
| Key |
Type |
Default |
Description |
blockedRegions |
list |
[your_region] |
WorldGuard region names where combat tagging is disabled |
preventPvpInRegions |
boolean |
true |
Prevent PvP from starting inside blocked regions |
restrictedRegionRadius |
int |
10 |
Radius (in blocks) around blocked regions where combat is also prevented |
⚔️ Combat Settings
combat:
releaseAttackerOnVictimDeath: true
disableElytraUsage: true
disableElytraOnDamage: true
disableFlying: true
unequipElytraOnCombat: true
disableFireworks: true
enableDamageCauseLogging: false
damageCauseRestrictionMode: WHITELIST
loggedDamageCauses: []
ignoredProjectileTypes:
- ENDER_PEARL
- EGG
quitPunishmentEventPriority: NORMAL
whitelistedKickReasons: []
| Key |
Type |
Default |
Description |
releaseAttackerOnVictimDeath |
boolean |
true |
When the victim dies, the attacker is also untagged |
disableElytraUsage |
boolean |
true |
Prevent all elytra use while in combat |
disableElytraOnDamage |
boolean |
true |
Cancel elytra gliding when the player takes damage |
disableFlying |
boolean |
true |
Disable /fly mode while in combat |
unequipElytraOnCombat |
boolean |
true |
Force-unequip the chestplate slot on combat entry |
disableFireworks |
boolean |
true |
Block firework rocket use during combat |
enableDamageCauseLogging |
boolean |
false |
Log every damage cause to console (useful for debugging tagging triggers) |
damageCauseRestrictionMode |
enum |
WHITELIST |
WHITELIST — only listed causes tag. BLACKLIST — all causes except listed tag |
loggedDamageCauses |
list of DamageCause |
[] |
Damage causes affected by the restriction mode |
ignoredProjectileTypes |
list of EntityType |
ENDER_PEARL, EGG |
Projectiles that do not trigger a combat tag |
quitPunishmentEventPriority |
EventPriority |
NORMAL |
Event priority for the logout-punishment handler |
whitelistedKickReasons |
list |
[] |
Server kick messages that will not be treated as a combat logout |
? Inventory Settings
inventory:
inventoryAccessMode: ALLOW_ALL
restrictedInventoryTypes:
- CHEST
- ENDER_CHEST
| Key |
Type |
Default |
Description |
inventoryAccessMode |
enum |
ALLOW_ALL |
ALLOW_ALL — players can open anything. RESTRICT — certain containers are blocked |
restrictedInventoryTypes |
list of InventoryType |
[] |
Containers blocked in RESTRICT mode (e.g. CHEST, ENDER_CHEST, BARREL, SHULKER_BOX) |
? Placeholder Settings
placeholders:
isInCombatFormattedTrue: "In Combat"
isInCombatFormattedFalse: "Not In Combat"
| Key |
Type |
Default |
Description |
isInCombatFormattedTrue |
string |
In Combat |
Text returned by %dcombat_isInCombat_formatted% when the player is tagged |
isInCombatFormattedFalse |
string |
Not In Combat |
Text returned by %dcombat_isInCombat_formatted% when the player is not tagged |
? Messages Settings
All messages use MiniMessage formatting and can target chat, action bar, title, or play a sound.
Available placeholders:
| Placeholder |
Description |
{PLAYER} |
Target player's name |
{TIME} |
Duration value |
{PERMISSION} |
Missing permission node |
{USAGE} |
Correct command usage |
{Y} |
Y-level coordinate |
{MODE} |
Block placement mode name |
{COUNT} |
Number of players |
{FIRST_PLAYER} |
First player in a dual-tag |
{SECOND_PLAYER} |
Second player in a dual-tag |
Message keys:
| Key |
When it's sent |
onlyForPlayers |
A console used a player-only command |
adminTagPlayer |
Admin tags a single player |
adminTagMultiplePlayers |
Admin mutually tags two players |
adminUntagPlayer |
Admin untags a player |
adminUntagAll |
Admin untags everyone |
adminPlayerNotInCombat |
Target wasn't combat-tagged |
playerInCombat |
Status check — player is tagged |
playerNotInCombat |
Status check — player is not tagged |
adminCannotTagSelf |
Admin tried to include themselves in a dual-tag |
adminTagOutSelf |
Admin granted themselves tag-out immunity |
adminTagOut |
Admin granted a player tag-out immunity |
playerTagOut |
Sent to the player who received immunity |
adminTagOutOff |
Admin removed a player's tag-out immunity |
playerTagOutOff |
Sent to the player whose immunity was removed |
adminTagOutCanceled |
Tag command blocked because the target has immunity |
combatStats |
Response to /combatlog stats |
❤️ Lifesteal Settings
Requires LifestealCore to be installed.
lifesteal:
enabled: false
heartsToSteal: 1
stealOnlyInCombat: true
stealOnKill: true
stealOnDeath: false
eliminateOnZeroHearts: true
notifyOnKill: true
| Key |
Type |
Default |
Description |
enabled |
boolean |
false |
Master toggle for LifestealCore integration |
heartsToSteal |
int |
1 |
Hearts transferred from victim to killer on death |
stealOnlyInCombat |
boolean |
true |
Only steal hearts when at least one party is combat-tagged |
stealOnKill |
boolean |
true |
Killer gains hearts on kill |
stealOnDeath |
boolean |
false |
Victim loses hearts on death regardless of stealOnKill |
eliminateOnZeroHearts |
boolean |
true |
Victim is eliminated (banned by LifestealCore) when their hearts hit zero |
notifyOnKill |
boolean |
true |
Send a chat notification when hearts are stolen |
? PlaceholderAPI
Requires PlaceholderAPI to be installed. The identifier is dcombat.
| Placeholder |
Returns |
%dcombat_isInCombat% |
true or false |
%dcombat_isInCombat_formatted% |
Your configured isInCombatFormattedTrue / isInCombatFormattedFalse strings |
%dcombat_remaining_seconds% |
Seconds left on the combat timer (empty when not tagged) |
%dcombat_remaining_millis% |
Milliseconds left on the combat timer (empty when not tagged) |
%dcombat_opponent% |
Name of the player who tagged this player (empty when not tagged) |
%dcombat_opponent_health% |
Opponent's current health, to 2 decimal places (empty when not tagged) |
? Developer API
Dcombat exposes a DcombatApi interface for other plugins.
DcombatApi api = DcombatProvider.get();
FightManager fightManager = api.getFightManager();
RegionProvider regions = api.getRegionProvider();
PearlService pearls = api.getFightPearlService();
FightTagOutService tagOut = api.getFightTagOutService();
FightEffectService effects = api.getFightEffectService();
DropService drops = api.getDropService();
DropKeepInventoryService keepInv = api.getDropKeepInventoryService();
Events
FightTagEvent — fired when a player is combat-tagged (cancellable)
@EventHandler
public void onTag(FightTagEvent event) {
UUID player = event.getPlayer();
CauseOfTag cause = event.getCause(); // PVP, COMMAND, etc.
event.setCancelled(true); // prevent the tag
}
FightUntagEvent — fired when a player's combat tag is removed (cancellable)
@EventHandler
public void onUntag(FightUntagEvent event) {
UUID player = event.getPlayer();
CauseOfUnTag cause = event.getCause(); // DEATH, TIMER, COMMAND, etc.
}
BorderShowAsyncEvent / BorderHideAsyncEvent
Fired asynchronously when the visual combat border is shown or hidden for a player.
? Plugin Integrations
| Plugin |
Status |
What it enables |
| PacketEvents |
⚠️ Required |
Packet-level elytra blocking, flying control, border rendering |
| PlaceholderAPI |
Optional |
%dcombat_*% placeholder expansion |
| WorldGuard |
Optional |
blockedRegions and restrictedRegionRadius functionality |
| Lands |
Optional |
Claim boundaries used as combat-safe zones |
| Vault |
Optional |
Economy integration hook |
| LifestealCore |
Optional |
Heart-stealing on combat kills |
? License
Copyright (c) 2026 Devamy. All rights reserved.
This project is proprietary source code. No permission is granted to copy, modify, distribute, sell, sublicense, or claim this code as someone else's work without prior written permission from the copyright holder.
评论 0
登录后参与评分
还没有评论,来抢沙发吧