CombatLOG
适用于 Paper/Purpur 26.3 的 PvP 战斗掉线防逃插件
版本 2.1.0 · Minecraft 26.3 · Java 25 · 服务端
CombatLOG 防止玩家通过断开连接来逃避 PvP。当两名玩家交战时,双方会在一段可配置的时间内被标记为战斗中状态(每次受到攻击时刷新计时)。在处于该状态期间,玩家会看到倒计时 Boss 栏、标题和聊天消息,并且无法执行已配置的命令(如 /tpa 或 /home)。如果处于战斗中的玩家断开连接,他们将被杀死,其物品会在掉线处掉落。
功能
- 战斗标记:对近战和(可选的)投射物命中进行标记,并在每次命中时刷新。
- 断线惩罚:断开连接的处于战斗中的玩家会通过正常的原版死亡方式(
setHealth(0))被击杀——无需手动掉落/清除物品,因此不存在复制窗口,且总不会保存掉线死亡的复活效果。
- 倒计时 Boss 栏:支持自定义颜色和覆盖样式。
- 标题和聊天消息:在标记开始/结束时显示,以及可选的周期性倒计时提醒。
- 拦截命令:在战斗标记期间阻止执行已列出的命令,并支持命名空间剥离(例如
essentials:tpa 会被匹配为 tpa)。
combatlog.bypass 权限:供不应被标记的工作人员/VIP 使用。
- 世界和模式过滤:忽略指定的世界,并可选择跳过处于创造模式的玩家。
- 广播:当玩家战斗掉线时进行广播。
- 多语言支持(英语、葡萄牙语、法语),可通过 PlayerSettings 实现按玩家单独设置语言。
- 开发者 API(通过服务管理器提供的
CombatLogApi)以及战斗标记/结束/掉线事件。
命令
| 命令 |
描述 |
权限 |
/combatlog reload (别名 /clog, /cl) |
重新加载配置 |
combatlog.admin |
/combatlog status |
显示你的战斗状态 |
— |
/combatlog version |
显示插件版本 |
— |
权限
| 节点 |
描述 |
默认值 |
combatlog.admin |
重新加载插件 |
op |
combatlog.bypass |
不被战斗标记 |
false |
配置
language: en_US # en_US | pt_PT | fr_FR
combat:
tag-seconds: 30
apply-to-projectiles: true
apply-in-creative: false
block-gamemode-change: true # 拒绝在战斗标记期间更改游戏模式为创造/旁观者
block-cushion-sitting: true # 战斗标记期间禁止坐在软垫上(坐姿=无击退)
ignore-worlds: []
punishment:
kill-on-disconnect: true
broadcast: true
bossbar:
enabled: true
color: RED # PINK, BLUE, RED, GREEN, YELLOW, PURPLE, WHITE
overlay: PROGRESS # PROGRESS, NOTCHED_6/10/12/20
title: "&c⚔ Combat &7| &f{time}s" # {time} = 剩余秒数
update-ticks: 2
titles:
on-tag-start: true
on-tag-end: true
chat:
tag-start: true
tag-end: true
countdown:
enabled: false
interval-seconds: 5
blocked-commands:
enabled: true
list: [tpa, tpaccept, tpahere, spawn, home, sethome, warp, back, rtp]
每种语言的 Boss 栏标题位于 lang/*.yml 文件中的 bossbar.title;config.yml 中的 bossbar.title 作为后备选项。
安装
- 需要 Paper 或 Purpur 26.3 以及 Java 25(2.0.0 运行于 26.2,1.x 版本运行于 1.21.x)。
- 将 JAR 文件放入
plugins/ 目录,并启动服务器一次以生成 config.yml。
- 调整
combat、punishment 和 blocked-commands 配置,然后运行 /combatlog reload。
依赖项
- PlayerSettings (可选) —— 用于按玩家选择语言,需安装此插件方可生效。
无强制依赖项。
注意事项
战斗标记保存在内存中,重启后不会持久化。blocked-commands 列表仅阻止已配置命令的执行,但无法阻止非命令类的逃跑行为(如末影珍珠、传送 GUI、未列出的别名)。本插件最适合用于近战/弓弩 PvP;间接 PvP(末地水晶、TNT、床/锚)在此版本中不会被标记。
支持 / 源码
源代码:
CombatLOG
PvP combat-logging prevention for Paper/Purpur 26.3
Version 2.1.0 · Minecraft 26.3 · Java 25 · Server-side
CombatLOG stops players from escaping PvP by disconnecting. When two players
fight, both become combat tagged for a configurable time (refreshed on each
hit). While tagged, players see a countdown boss bar, titles and chat messages,
and cannot run configured commands (like /tpa or /home). If a tagged player
disconnects, they are killed and their items drop where they logged out.
Features
- Combat tagging on melee and (optionally) projectile hits, refreshed on
every hit.
- Disconnect punishment: tagged players who log out are killed via a normal
vanilla death (
setHealth(0)) — no manual drop/clear, so no dupe window,
and totems cannot save the logout death.
- Countdown boss bar with configurable color and overlay.
- Titles and chat messages on tag start/end, plus optional periodic
countdown reminders.
- Blocked commands while tagged, with namespace stripping (e.g.
essentials:tpa is matched as tpa).
combatlog.bypass permission for staff/VIP who should not be tagged.
- World and mode filters: ignore configured worlds, and optionally skip
creative-mode players.
- Broadcast when a player combat logs.
- Multi-language (English, Portuguese, French) with optional per-player
language via PlayerSettings.
- Developer API (
CombatLogApi via the services manager) plus combat
tag/end/log events.
Commands
| Command |
Description |
Permission |
/combatlog reload (aliases /clog, /cl) |
Reload the configuration |
combatlog.admin |
/combatlog status |
Show your combat status |
— |
/combatlog version |
Show plugin version |
— |
Permissions
| Node |
Description |
Default |
combatlog.admin |
Reload the plugin |
op |
combatlog.bypass |
Not combat tagged |
false |
Configuration
language: en_US # en_US | pt_PT | fr_FR
combat:
tag-seconds: 30
apply-to-projectiles: true
apply-in-creative: false
block-gamemode-change: true # refuse creative/spectator while tagged
block-cushion-sitting: true # no sitting on a cushion while tagged (seated = no knockback)
ignore-worlds: []
punishment:
kill-on-disconnect: true
broadcast: true
bossbar:
enabled: true
color: RED # PINK, BLUE, RED, GREEN, YELLOW, PURPLE, WHITE
overlay: PROGRESS # PROGRESS, NOTCHED_6/10/12/20
title: "&c⚔ Combat &7| &f{time}s" # {time} = remaining seconds
update-ticks: 2
titles:
on-tag-start: true
on-tag-end: true
chat:
tag-start: true
tag-end: true
countdown:
enabled: false
interval-seconds: 5
blocked-commands:
enabled: true
list: [tpa, tpaccept, tpahere, spawn, home, sethome, warp, back, rtp]
Per-language boss bar titles live in lang/*.yml (bossbar.title); the
bossbar.title in config.yml is a fallback.
Installation
- Requires Paper or Purpur 26.3 and Java 25 (2.0.0 runs on 26.2, 1.x on 1.21.x).
- Drop the JAR into
plugins/ and start the server once to generate
config.yml.
- Adjust
combat, punishment and blocked-commands, then run
/combatlog reload.
Dependencies
- PlayerSettings (optional) — per-player language selection, if installed.
No hard dependencies.
Notes
Combat tags are kept in memory and are not persisted across restarts. The
blocked-commands list stops configured commands but not non-command escapes
(ender pearls, teleport GUIs, unlisted aliases). Best suited to melee/bow PvP;
indirect PvP (end crystals, TNT, beds/anchors) is not tagged in this release.
Support / Source
Source code:
评论 0
登录后参与评分
还没有评论,来抢沙发吧