Please Consider Donating - Every Dollar Counts
A server-installable PvP opt-in system with combat tagging, smart cooldowns, and a full admin toolkit — for Minecraft 1.19.2 Forge.
Combat Toggle lets every player on your server choose whether they can be attacked. It's a ship-it-on-a-modpack solution for the "some players want PvP, some don't" problem — no world-border workarounds, no region plugins, no third-party dependencies. Install it on your dedicated server and vanilla clients can join and use /ct without touching their game.
/ct to flip modes with no client install. Modded clients additionally get a rebindable V keybind and an on-screen HUD indicator./ct, /combat, /peace, and /combattoggle status work from any client — modded or vanilla.V (modded clients only). Fully rebindable per-client.F1.LivingAttackEvent (HIGH priority) — knockback, hurt sound, and the PLAYER_HURT_ENTITY advancement criterion never fire on Peace targets. LivingHurtEvent runs as defence-in-depth. Attacker resolution walks projectile owners, primed-TNT owners, and tamed pets, so wolves, snow golems, and ignited TNT are correctly attributed.No permissions required.
| Command | Purpose |
|---|---|
/ct |
Toggle Combat ↔ Peace. |
/combat |
Set yourself to Combat mode. |
/peace |
Set yourself to Peace mode. |
/combattoggle status |
Show your own mode, tag, and cooldown. |
/combattoggle help |
List every command you can run (admin entries hidden for non-OP). |
Require OP level 2.
| Command | Purpose |
|---|---|
/combattoggle get <player> |
Inspect another player's state. |
/combattoggle set <player> <peace\|combat> [bypass] |
Force a mode. bypass=true overrides cooldown + tag guard. |
/combattoggle tag <player> [seconds] |
Apply a combat tag manually (1–3600s). |
/combattoggle untag <player> |
Clear a combat tag. |
/combattoggle resetcooldown <player> |
Clear both toggle and PvP cooldowns. |
/combattoggle resync |
Refresh scoreboard teams and resync HUD state for everyone online (/combattoggle reload is an alias). |
CombatToggleData); same in-memory instance for the player's whole session, no per-call NBT churn. There's no public API today, but a future minor can expose one without re-architecting.combattoggle.msg.*). Ship translations without code patches.NetworkRegistry.acceptMissingOr(PROTOCOL::equals); vanilla clients pass through, sync packets are dropped silently to peers without the channel.combattoggle-1.2.0.jar into your server's (or client's) mods/ folder.combattoggle-server.toml is generated in your world's serverconfig/ directory and combattoggle-client.toml in the client config folder.Server-installable? Yes. Install on the dedicated server only and vanilla clients can join and use /ct, /combat, /peace, and /combattoggle status with no client-side install. Players who additionally install the mod client-side get the V keybind and the HUD indicator on top — eye candy over the same server-authoritative logic.
combattoggle-server.toml| Key | Default | What it does |
|---|---|---|
cooldownSeconds |
600 |
Cooldown duration (10 min). Set to 0 to disable cooldown entirely. |
combatTagSeconds |
30 |
How long a combat tag lasts after a PvP event. |
requireBothCombatEnabled |
true |
If true, PvP only works when both attacker and target are in Combat. |
forceCombatWhileTagged |
true |
Force tagged players into Combat mode. |
allowToggleWhileTagged |
false |
If false, Combat-tagged players cannot switch to Peace. |
cooldownTriggersOnPvp |
true |
Cooldown starts when a player deals or takes PvP damage. |
cooldownTriggersOnToggle |
false |
Cooldown starts when a player toggles. |
cooldownAppliesToPeaceOnly |
true |
Cooldown only blocks Combat→Peace; Peace→Combat is always instant. |
allowAdminBypassCooldown |
true |
bypass=true on /combattoggle set actually works. |
useScoreboardTeams |
true |
Disable to keep Combat Toggle out of the scoreboard entirely. |
useEmojiPrefixes / useNameplateColors |
true / true |
Independent toggles for the two visual effects. |
combatEmoji / peaceEmoji |
⚔ / ☕ |
Any BMP Unicode. |
combatTeamName / peaceTeamName |
ct_combat / ct_peace |
Rename to avoid clashes. |
combattoggle-client.toml| Key | Default | What it does |
|---|---|---|
hudEnabled |
true |
Master switch for the HUD icon. |
hudShowInCombatMode |
true |
Show the icon while in Combat mode. |
hudShowInPeaceMode |
true |
Show the icon while in Peace mode. |
hudAnchor |
TOP_CENTER |
One of TOP_LEFT, TOP_CENTER, TOP_RIGHT, CENTER_LEFT, CENTER, CENTER_RIGHT, BOTTOM_LEFT, BOTTOM_CENTER, BOTTOM_RIGHT, CUSTOM. |
hudOffsetX |
0 |
Inward pixel offset from the anchor. Absolute screen X if hudAnchor=CUSTOM. |
hudOffsetY |
6 |
Inward pixel offset from the anchor. Absolute screen Y if hudAnchor=CUSTOM. |
hudScale |
1.0 |
Range 0.5–3.0. |
hudShowTimers |
true |
Show tag/cooldown countdown text below the icon. |
showHud server config key is gone. HUD visibility is purely client-side now via hudEnabled in combattoggle-client.toml. Existing operator configs keep the orphan key on first read; Forge logs an unused-key warning. Harmless."1" for the 1.2.x line. 1.1.x modded clients cannot connect to a 1.2.0 server (handshake rejects); they need to upgrade. Vanilla clients are unaffected.useScoreboardTeams=false resolves conflicts with mods that own the scoreboard.LivingAttackEvent (primary) and LivingHurtEvent (fallback). A handful of mods route damage through custom mixins that bypass both — those will hit Peace targets. Open an issue with a reproduction if you hit this./combat and /peace are common literal namespaces. If another mod or plugin registers the same root, behavior depends on registration order — fall back to /ct and /combattoggle <subcmd>./ct. By design.Pull requests and bug reports welcome. Please include server logs, your combattoggle-server.toml, and a minimal repro when filing an issue.