promotional bannermobile promotional banner

Combat Toggle

Combat Toggle is a lightweight server-side PvP control mod that prevents accidental or unwanted player combat by requiring mutual opt-in before PvP damage is allowed. Combat only activates when both players are in Combat mode.
Back to Files

Combat Toggle 2.0.0 (Forge 1.20.1)

File namecombattoggle-2.0.0.jar
Uploader
OtectusOtectus
Uploaded
Aug 17, 2026
Downloads
244
Size
151.3 KB
Mod Loaders
Forge
File ID
8666624
Type
R
Release
Supported game versions
  • 1.20.1

Curse Maven Snippet

Forge

implementation fg.deobf("curse.maven:combat-toggle-1447882:8666624")

Learn more about Curse Maven

What's new

Version 2.0.0 - August 16, 2026

A major stability, compatibility, and quality-of-life update for Combat Toggle.

Important for add-on developers: Combat Toggle 2.0 updates its network and API systems. Add-ons built for 1.x will need to be updated and recompiled.

Major Fixes

  • Fixed fresh installations failing to build because an important Gradle file was missing.
  • Fixed new players being incorrectly stuck with a 10-minute cooldown when first joining a world.
  • Fixed combat tags sometimes expiring early after their duration had been extended.
  • Fixed several issues with arrows, TNT, and other delayed damage when the attacking player disconnected.
  • Fixed players being forced into Combat mode when combat tagging was disabled.
  • Fixed Combat Toggle replacing scoreboard teams created by other mods, plugins, minigames, or factions.
  • Fixed cancelled or zero-damage attacks incorrectly applying combat tags and cooldowns.
  • Fixed a movement issue that could interfere with player velocity and knockback.
  • Fixed player Combat Toggle data potentially being lost after death.
  • Fixed pressing the toggle key while using chat, inventories, or other menus causing an unwanted toggle after closing them.
  • Fixed the HUD briefly showing the wrong mode when joining a server.
  • Fixed excessive network traffic caused by repeatedly sending toggle requests.
  • Fixed several smaller syncing, networking, and event-handling issues.

Combat Tags & Mode Switching

  • Combat tags now update and expire more reliably.

  • Players forced into Combat mode by a tag can now automatically return to their previous mode when the tag ends.

    • Controlled by the new restoreModeAfterTag option.
    • Enabled by default.
  • If forceCombatWhileTagged and allowToggleWhileTagged conflict, forced Combat mode now takes priority.

  • Switching to the mode you're already using no longer triggers unnecessary cooldowns, messages, events, or updates.

  • Other mods can now properly cancel mode changes through Combat Toggle's event system.

HUD Improvements

  • Cooldown timers now only appear when the cooldown is actually preventing you from switching modes.

  • Added showInformationalCooldown for players who still want to see cooldowns that aren't currently blocking a toggle.

  • Added a new Compact HUD option with a small icon-only display.

  • Added:

    • hudXOffset
    • hudOpacityPercent
  • HUD elements are now kept within the screen instead of being possible to move completely off-screen.

  • Timer formatting has been improved:

    • Timers no longer show 00:00 while still active.
    • Durations longer than an hour display properly.
  • HUD text is now fully translatable.

New Player Features

  • Added an optional first-join welcome message explaining:

    • The player's current mode.
    • The toggle key.
    • The /combattoggle status command.
  • Added defaultCombatMode, allowing server owners to choose whether new players begin in Peace or Combat mode.

  • Added optional sounds for successful and refused mode switches.

Commands & Administration

Improved /combattoggle commands to provide clearer and more useful information.

  • /combattoggle now displays available commands instead of an error.

  • /get now shows:

    • Current mode.
    • Remaining combat tag time.
    • Current cooldown.
    • What caused the cooldown.
    • Whether Combat mode is being forced.
  • /set, /tag, /untag, and /resetcooldown now give clearer feedback about what actually happened.

  • Added /combattoggle debug <player> to provide detailed information useful when troubleshooting bugs.

  • Added adminPermissionLevel so server owners can configure the permission level required for admin commands.

  • Added announceAdminActionsToTarget to control whether players are notified when an administrator changes their state.

  • Improved the behavior of administrative bypass options.

  • /reload is now deprecated in favor of /resync.

  • Players are now notified when another mod prevents them from switching modes.

Configuration Improvements

  • Configuration files are now checked more carefully for invalid or conflicting settings.
  • Invalid or duplicate blocked damage types are now reported instead of silently being ignored.
  • Team names are validated when the configuration loads.
  • Reloading the configuration now properly updates teams and resyncs online players.
  • Conflicting options now produce clearer warnings explaining which setting will take priority.

Mod Compatibility

Combat Toggle now handles scoreboard teams much more safely.

By default, players already belonging to a team created by another mod, plugin, faction, or minigame will keep that team.

A new teamConflictPolicy setting allows server owners to choose between:

  • PRESERVE_EXISTING — keep existing teams. Default.
  • OVERRIDE — allow Combat Toggle to replace them.

Combat Toggle also avoids repeatedly updating teams when nothing has changed, reducing unnecessary server and network activity.

Version Support

Combat Toggle 2.0 now officially targets:

  • Minecraft 1.20.1
  • Forge 47.x
  • A supported Java version is now checked when the mod loads.

Previous metadata incorrectly suggested compatibility with Minecraft versions up to 1.21 and newer Forge versions that had not actually been tested.

API Changes

Combat Toggle's API has been cleaned up and expanded for other mod developers.

Added API support for:

  • Setting or forcing Combat mode.
  • Applying and removing combat tags.
  • Resetting cooldowns.
  • Checking PvP permission while taking the damage type into account.
  • Reading Combat Toggle statistics.

Several internal API classes have moved, so mods built against Combat Toggle 1.x will need to be recompiled for 2.0.

The network protocol has also changed, meaning 1.x clients cannot connect to servers running Combat Toggle 2.0.

New Debugging & Statistics

Combat Toggle now tracks statistics for:

  • Allowed and blocked PvP attacks.
  • Combat tags.
  • Mode changes.
  • Cancelled changes.
  • Unidentified or disconnected attackers.
  • Dropped network requests.

These can be viewed through /combattoggle debug and accessed through the mod API.

Stability & Testing

Combat Toggle 2.0 received a major overhaul of its internal testing and release process.

  • Added 103 automated tests covering combat rules, cooldowns, tags, mode switching, saved player data, and previous bugs.
  • Added automatic checks for missing or unused translations.
  • Added checks to prevent client-only code from accidentally being included in dedicated server logic.
  • Builds are now reproducible and more thoroughly checked before release.
  • Windows builds are now tested automatically.
  • Release files and version numbers are verified before publishing.
  • The mod's license, project links, issue tracker, and mod-list icon are now properly included.

This mod has no additional files