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.19.2)

File namecombattoggle-2.0.0.jar
Uploader
OtectusOtectus
Uploaded
Aug 28, 2026
Downloads
85
Size
202.3 KB
Mod Loaders
Forge
File ID
8756095
Type
R
Release
Supported game versions
  • 1.19.2

Curse Maven Snippet

Forge

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

Learn more about Curse Maven

What's new

[2.0.0]

A major correctness, anti-exploit, and quality-of-life update focused on combat tags, combat logging, PvP regions, safer toggling, better admin controls, and improved performance.

Existing modes, tags, cooldowns, and 1.2.0 config options carry over normally.

Fixed Combat Tags & Cooldowns

  • Fixed new players incorrectly receiving a PvP cooldown in newly created worlds.
  • Fixed /combattoggle resetcooldown not working correctly during that period.
  • Combat tags now clear on death by default with:

clearTagOnDeath = true

  • Added 10 seconds of respawn protection by default to prevent immediate chain-killing after death.
  • Respawn protection ends early if the protected player attacks someone.
  • Players are now notified when their combat tag expires.
  • Added live action-bar tag countdowns.
  • /combattoggle tag now sets the requested duration exactly instead of only extending existing tags.
  • Added allowAdminBypassTag for controlling whether administrators can bypass active tags.
  • Fixed FakePlayers from automation mods potentially causing server crashes.
  • Fixed contradictory allowToggleWhileTagged and forceCombatWhileTagged behavior.
  • Peace-mode victims are no longer automatically forced into Combat just because a Combat player attacks them.

Combat Logging Protection

Added configurable combat-logging behavior through combatLogAction:

  • FREEZE_TAGDefault. Pauses the remaining combat tag while offline and restores it on login.
  • KILL — kills the player when they disconnect during combat.
  • KEEP_BODY — leaves a lootable stand-in containing their inventory.
  • NONE — preserves the old behavior.

Nearby opponents are also notified when someone disconnects during combat.

Escape Prevention

Servers can now restrict common ways of escaping while combat-tagged.

Support includes:

  • Blocked commands such as /home, /spawn, and /tp.
  • Ender Pearls.
  • Chorus Fruit.
  • Portals.
  • Elytra flight.
  • Riptide.

These restrictions are configurable.

More Complete PvP Protection

Combat Toggle now covers several indirect PvP methods that previously bypassed normal checks:

  • Splash and lingering potions.
  • Fishing rods.
  • End crystals.
  • TNT minecarts.
  • Respawn anchors.
  • Beds.

Pets and mounts are also protected according to their owner's Combat/Peace status.

This includes wolves, cats, parrots, horses, and the entity a player is currently riding.

Better Combat Tagging

Added:

tagOnAttemptedHit = true

Combat tags can now apply when an attack is attempted rather than only when damage successfully lands.

This prevents players from attacking into shields and then immediately switching back to Peace mode.

Optional Toggle Warm-Up

Added:

toggleWarmupSeconds = 0

When enabled, changing Combat/Peace mode takes effect after a short delay.

The pending change is cancelled if the player deals or receives damage.

PvP Regions

Added configurable PvP regions.

Administrators can create named areas that:

  • Force Combat mode.
  • Force Peace mode.
  • Restore normal Combat Toggle behavior.

Commands include:

/combattoggle region add|remove|list|info|here

Also added:

  • spawnSafeRadius for easy spawn protection.
  • enabledDimensions for disabling Combat Toggle entirely in selected dimensions.

Regions are saved per dimension.

Improved HUD & Vanilla Client Support

Vanilla clients now receive more useful combat information without needing the client mod.

Added:

  • Action-bar combat-tag countdowns.
  • Optional mode-change title messages.
  • Optional combat-tag boss bars.
  • Clickable /combattoggle help.

Players without the client mod can optionally receive a one-time notice explaining that installing it adds:

  • HUD elements.
  • Live timers.
  • A keybind.
  • An in-game settings screen.

HUD Customization

Added an in-game HUD settings screen accessible through:

Mods → Combat Toggle → Config

It includes:

  • Draggable live HUD preview.
  • Configurable timer colors.
  • Text-only mode.
  • Low-time pulsing.
  • Optional sound cues.

Admin Improvements

Expanded administration commands with:

  • Player selector support for set, tag, untag, and resetcooldown.
  • /combattoggle list [combat|peace|tagged] [page]
  • /combattoggle offline <name> ... for safely editing offline player data.
  • defaultMode
  • resetModeOnJoin

Added Forge permission nodes for all commands while preserving the existing vanilla permission levels when no permissions mod is installed.

Audit Logging

Important Combat Toggle state changes are now recorded in the server log with:

  • Who caused the change.
  • Which player was affected.
  • Where the change came from.
  • Previous and new state.

This makes disputes such as "I never enabled Combat mode" much easier for server administrators to investigate.

Performance Improvements

  • Scoreboard team styling is no longer repeatedly resent to every player whenever someone toggles.
  • Reduced unnecessary scoreboard network traffic.
  • Frequently used config values are now cached instead of repeatedly read during damage events and HUD rendering.
  • Reduced repeated capability lookups during combat.
  • Combat timers are only processed when players actually have an active timer.

Reliability Improvements

  • Server configs are now validated when loaded.
  • Invalid team names and problematic prefixes are detected earlier.
  • Conflicting config combinations now produce warnings.
  • All toggle methods now use the same rate limiting, including commands, keybinds, and API calls.
  • /combattoggle reload now actually reapplies configuration to the live server instead of behaving like resync.
  • Disabled scoreboard teams are removed once empty instead of remaining permanently in the world save.

API & Events

Added a public CombatToggleAPI along with events for:

  • Combat mode changes.
  • Combat tags.
  • Blocked PvP actions.

This gives other mods a supported way to integrate with Combat Toggle.

Localization

Full translations now ship for:

  • English
  • German
  • French
  • Russian
  • Simplified Chinese
  • Brazilian Portuguese

Remaining hardcoded HUD text has also been moved into the translation system.

Compatibility

  • Network protocol updated to 2.
  • Vanilla clients remain supported.
  • Older 1.2.x modded clients must update before connecting.
  • Existing configs remain compatible.
  • Existing player modes, tags, and cooldowns are preserved.

This mod has no related projects