

在不破坏服务器的前提下,精细调整 Minecraft 的战斗、移动和物品平衡。OldCombatMechanics 是一款面向 Spigot & Paper 的免费开源工具包,允许你混合使用 1.8 风格的“打击感”与现代特性,并支持按世界或按玩家进行配置。它专为 PvP 网络、小游戏、BedWars/SkyWars 类游戏、决斗、KitPvP、练习场以及需要不同区域采用不同战斗规则的混合 PvP/PvE 世界而设计。
为什么服务器选择 OCM ✨
- ? 模块化:仅启用你需要的功能:冷却时间、工具伤害、击退、盾牌、药水、攻击距离、音效等。
- ? 高性能:按需启用的轻量监听器;反射查找结果会被缓存,重复任务被最小化(尽可能共享),以确保在繁忙的 PvP 服务器上保持较低的 Tick 时间。
- ?️ Modesets(模式集):为不同的世界或玩家分发不同的规则;非常适合 PvP 网络、BedWars/SkyWars 类小游戏、决斗、KitPvP、FFA、练习场以及混合 PvP/PvE 环境。
- ? 插件友好的 API:通过应用仅限会话的玩家模块覆盖、管理玩家 modeset 以及检查模块是否实际启用,将 OCM 与游戏逻辑集成。
- ⏪ 向后兼容:支持 Java 8+,兼容从 1.9 到最新版本;可与 PlaceholderAPI 和 PacketEvents 无缝集成。
- ✅ 经过测试:每次构建都会运行实时集成测试,涵盖多个版本的真实 Paper 服务器。
- ? 零成本:完全开源,可选的基础遥测数据(仅 bStats),无付费墙。
快速入门 ⚡
- 将 jar 文件放入
plugins/ 目录(适用于 Spigot 或 Paper 衍生版 1.9+)。
- 重启服务器并编辑
config.yml 以选择你的模块和 modeset。
- 使用
/ocm reload 即时应用更改。
- 向玩家发放
/ocm modeset <name> 命令,让他们选择自己的规则集。

? Modesets
- 按玩家/按世界的预设,决定哪些功能处于激活状态;每个世界都有一个允许列表和一个默认 modeset。
- 允许玩家选择(
/ocm modeset <name> )以在竞技场世界中运行类似 1.8 风格的 PvP,同时在生存模式中保留原版规则。
? 专为小游戏和 PvP 网络打造
- 在竞技场比赛中运行旧式战斗机制,同时在大厅、生存或活动世界中保留现代机制。
- 为 BedWars、SkyWars、决斗、KitPvP、FFA、练习场、锦标赛和临时活动定制规则,无需因拆分网络而依赖额外插件。
- 保持配置对管理员的可读性:结合世界默认设置、玩家选择的 modeset 以及针对特殊比赛阶段的定向插件覆盖。
? 开发者 API
- OCM 通过 Bukkit 的服务管理器注册其 API,因此其他插件可以查找它而无需依赖内部实现类。
- 当前 API 支持仅限会话的玩家模块覆盖、玩家 modeset 查询/更改,以及对 OCM 状态变化的事件响应。
- 插件还可以检查在世界规则、玩家选择和覆盖都被考虑后,某个模块是否对玩家实际启用。
- 覆盖不会在重启或重连之间持久保存;当需要时,请从你的游戏状态中重新应用它们。
- 请参阅 API.md 获取依赖设置、
plugin.yml 指导、方法详情以及 Java/Kotlin 示例。
⚙ 可配置功能
功能按如下所示分组在 module(模块)中,并且可以单独配置和禁用。禁用的模块不会对服务器性能产生影响。
⚔ 战斗
微调时机、伤害和攻击距离。
- 攻击冷却时间:调整或移除 1.9+ 版本的攻击冷却
- 攻击频率:设置全局命中延迟
- 工具伤害:使用 1.9 之前的武器数值
- 攻击范围(Paper 1.21.11+):采用 1.8 风格的攻击距离
- 暴击:控制暴击倍率
- 玩家生命恢复:调整生命恢复速率
? 盔甲
平衡防御与耐久消耗。
- 盔甲强度:按比例缩放盔甲防护值
- 盔甲耐久度:改变耐久度损耗
? 剑与盾牌
控制格挡与横扫行为。
- 剑的格挡:恢复旧版右键格挡机制;在 Paper 1.21.2+ 上,我们还通过可食用组件添加了原生的剑格挡动画
- 盾牌减伤:按比例缩放盾牌保护效果
- 剑的横扫:启用或禁用横扫攻击
- 剑的横扫粒子:隐藏或显示横扫视觉效果
? 击退
针对每种来源塑造击退效果。
- 玩家击退:调整 PvP 中的击退效果
- 钓鱼击退:鱼竿产生的击退效果
- 鱼竿速度:拉取速度
- 投射物击退:箭矢及其他投射物
? 金苹果与药水
更改消耗品的效果强度。
- 金苹果的合成与效果:包括附魔金苹果和普通金苹果
- 药水效果与持续时间:使用旧版数值
- 紫颂果:传送行为与范围
❌ 新功能禁用
切换后续版本引入的机制。
- 物品合成:阻止特定配方的合成
- 副手:禁用副手功能
- 新攻击音效:静音新的挥砍音效
- 末影珍珠冷却:启用或移除冷却时间
- 酿造台燃料补充:修改燃料消耗方式
- 燃烧延迟:调整火焰蔓延的 Tick 延迟
? 兼容性与测试
- OCM 目标服务器为 Spigot 1.9+,支持 Java 8 及以上版本。
- 我们坚持使用 Spigot/Paper API 以保持向前兼容;仅在必要时才使用 NMS/反射技术。
- 每次构建都会启动真实服务器实例(包括 1.9.4、1.12、1.19.2、1.21.11 和 26.1.2)进行集成测试,以验证行为表现。
- 大多数插件均可与 OCM 良好配合。已针对性地实现了与 PlaceholderAPI(详见 wiki)以及 MythicMobs 中使用旧版玩家击退效果的无击退伤害技能的兼容性。
? 许可证
- 本仓库中的源代码遵循 Mozilla Public License 2.0 (MPL‑2.0) 许可。
- 预编译的 jar 包捆绑了 PacketEvents (GPLv3)。由于包含了该依赖项,这些二进制分发版依据 GPLv3 条款提供。
- 如果您在不包含 PacketEvents 的情况下自行构建 jar 包,您可以依据 MPL‑2.0 条款分发该构建版本。
⚡ 开发版本
通常情况下,特定的 bug 修复或功能特性可能已经实现,但尚未发布 OCM 的新版本。您可以在 Hangar 上找到最新的插件版本。
? 贡献指南
如果您有兴趣做出贡献,请先 查看此页面。
? 捐赠
如果这个项目对您有所帮助,请考虑请作者喝杯啤酒。本项目将始终保持免费!
此插件使用 bStats 指标统计。您可以在 bStats 插件文件夹中禁用它。
问题报告和功能建议仅会在 GITHUB 上被考虑。


Fine‑tune Minecraft combat, movement, and item balance without breaking your server. OldCombatMechanics is a free, open‑source toolkit for Spigot & Paper that lets you mix 1.8‑style snappiness with modern features, per world and per player. It is built for PvP networks, minigames, BedWars/SkyWars-style games, duels, KitPvP, practice arenas, and mixed PvP/PvE worlds that need different combat rules in different places.
Why servers pick OCM ✨
- 🧩 Modular: enable only what you need: cooldowns, tool damage, knockback, shields, potions, reach, sounds, more.
- 🚀 Performant: lean listeners only enabled as needed; reflection lookups are cached and recurring tasks are minimised (shared where possible) to keep tick time low on busy PvP servers.
- 🗺️ Modesets: ship different rules for different worlds or players; perfect for PvP networks, BedWars/SkyWars-style minigames, duels, KitPvP, FFA, practice arenas, and mixed PvP/PvE.
- 🔌 Plugin-friendly API: integrate OCM with game logic by applying session-only per-player module overrides, managing player modesets, and checking whether modules are effectively enabled.
- ⏪ Backwards‑friendly: runs on Java 8+, supports 1.9 to latest; integrates cleanly with PlaceholderAPI and PacketEvents.
- ✅ Tested for you: live integration tests run real Paper servers across multiple versions every build.
- 💸 Zero cost: fully open source, optional basic telemetry (bStats only), no paywalls.
Quick start ⚡
- Drop the jar into
plugins/ (Spigot or Paper-derivatives 1.9+).
- Restart and edit
config.yml to pick your modules and modesets.
- Use
/ocm reload to apply changes instantly.
- Hand players
/ocm modeset <name> to let them choose their ruleset.

🧰 Modesets
- Per-player/per-world presets that decide which features are active; each world has an allowed list and a default modeset.
- Let players pick (
/ocm modeset <name> ) to run, for example, 1.8-style PvP in an arena world while keeping vanilla rules in survival.
🏟 Built for minigames and PvP networks
- Run old-style combat in competitive arenas while keeping modern mechanics in lobbies, survival, or event worlds.
- Tailor rules for BedWars, SkyWars, duels, KitPvP, FFA, practice arenas, tournaments, and temporary events without splitting your network across extra plugins.
- Keep configuration readable for staff: combine world defaults, player-selected modesets, and targeted plugin overrides for special match phases.
🔌 Developer API
- OCM registers its API through Bukkit's services manager, so other plugins can look it up without depending on internal implementation classes.
- The current API supports session-only per-player module overrides, player modeset queries/changes, and events for reacting to OCM state changes.
- Plugins can also check whether a module is effectively enabled for a player after world rules, player choices, and overrides have been considered.
- Overrides are not persisted across restarts or reconnects; reapply them from your game state when needed.
- See API.md for dependency setup,
plugin.yml guidance, method details, and Java/Kotlin examples.
⚙ Configurable Features
Features are grouped in modules as listed below, and can be individually configured and disabled. Disabled modules will have no impact on server performance.
⚔ Combat
Tweak timing, damage, and reach.
- Attack cooldown: adjust or remove 1.9+ cooldown
- Attack frequency: set global hit delay
- Tool damage: pre-1.9 weapon values
- Attack range (Paper 1.21.11+): 1.8-style reach
- Critical hits: control crit multiplier
- Player regen: tune regen rates
🤺 Armour
Balance defence and wear.
- Armour strength: scale armour protection
- Armour durability: change durability loss
🛡 Swords & Shields
Control block and sweep behaviour.
- Sword blocking: restore old right-click block; on Paper 1.21.2+ we also add the native sword blocking animation via the consumable component
- Shield damage reduction: scale shield protection
- Sword sweep: enable or disable sweeps
- Sword sweep particles: hide or show sweep visuals
🌬 Knockback
Shape knockback per source.
- Player knockback: adjust PvP knockback
- Fishing knockback: fishing-rod knockback
- Fishing rod velocity: pull speed
- Projectile knockback: arrows and other projectiles
🧙 Gapples & Potions
Change consumable power.
- Golden apple crafting and effects: notch and normal
- Potion effects and duration: old-style values
- Chorus fruit: teleport behaviour and range
❌ New feature disabling
Toggle later-version mechanics.
- Item crafting: block selected recipes
- Offhand: disable offhand use
- New attack sounds: mute new swing sounds
- Enderpearl cooldown: enable or remove cooldown
- Brewing stand refuel: alter fuel use
- Burn delay: adjust fire tick delay
🔌 Compatibility & Testing
- OCM targets Spigot 1.9+ and runs on Java 8 and up.
- We stick to Spigot/Paper APIs for forward compatibility; NMS/reflection is used only when necessary.
- Integration tests boot real servers on 1.9.4, 1.12, 1.19.2, 1.21.11, and 26.1.2 each build to verify behaviour.
- Most plugins work fine with OCM. Targeted compatibility includes PlaceholderAPI (see wiki) and MythicMobs no-knockback damage skills with old-player-knockback.
🧾 Licence
- Source code in this repository is under the Mozilla Public License 2.0 (MPL‑2.0).
- Pre-built jars bundle PacketEvents (GPLv3). Those binary distributions are provided under GPLv3 terms due to the included dependency.
- If you build a jar without PacketEvents, you may distribute that build under MPL‑2.0, subject to its terms.
⚡ Development Builds
Oftentimes a particular bug fix or feature has already been implemented, but a new version of OCM has not been released yet. You can find the most up-to-date version of the plugin on Hangar.
🤝 Contributions
If you are interested in contributing, please check this page first.
🍺 Donations
If this project has helped you in any way, consider sending over a beer. The project will always remain free!
This plugin uses bStats metrics. You can disable it in the bStats plugin folder.
PROBLEM REPORTS AND FEATURE SUGGESTIONS WILL ONLY BE TAKEN INTO CONSIDERATION ON GITHUB.
评论 0
登录后参与评分
还没有评论,来抢沙发吧