Combat Toggle: Per-Player PvP on Your Minecraft 1.19.2 Forge Server
If you run a Minecraft server where some players live for duels and others just want to farm, build, and explore in peace, you already know how messy that mix can get. Region plugins, awkward world-border tricks, and arguments in chat do not always scale. Combat Toggle is a Forge mod for Minecraft 1.19.2 that treats PvP as a personal choice: every player opts in or out, while the server stays the single source of truth.
What Problem Does This Mod Solve?
Combat Toggle is built for the classic multiplayer tension: “some want PvP, some do not.” Instead of splitting the world or relying on fragile workarounds, it gives you a server-installable system with combat tagging, smart cooldowns, and a full admin toolkit. Drop it into your dedicated server’s mods folder, keep your world and biomes intact, and let mechanics handle the edge cases.
Peace Mode and Combat Mode
By default, new players start in Peace mode. In Peace, other players’ swords, arrows, potions, and projectiles pass through harmlessly, so casual builders are not ambushed while placing blocks. Flip to Combat mode when you are ready to fight: you can be hit, and you can hit back. Each player decides independently, which keeps social servers flexible without constant admin babysitting.
Modded clients get quality-of-life extras—a rebindable key (default V) and a small pixel-art HUD (shield for Peace, crossed swords for Combat) that respects F1 and hides in inventories. Vanilla clients skip the install entirely and still control everything with chat commands, which is ideal for modpack servers with mixed audiences.
Combat Tagging, Cooldowns, and Fair Play
Real PvP needs anti-combat-log rules. When PvP actually happens, Combat Toggle tags both the attacker and the victim for a configurable window (30 seconds by default). While tagged, you typically cannot slip back into Peace mode, so nobody toggles mid-fight to escape consequences. Cooldowns are “smart” by default: timers often start when PvP happens, not every time someone toggles while mining or traveling, though you can tune that behavior in server config.
State is persistent across logouts, respawns, dimension hops, and restarts thanks to Forge capability data on the player, so decisions feel consistent even after crashes or scheduled updates. Enforcement uses primary cancellation at LivingAttackEvent with defence-in-depth at LivingHurtEvent, and attacker resolution follows projectile owners, primed TNT, and pets so wolves, snow golems, and explosive pranks credit the right player.
Commands Everyone Can Use
No special permissions are required for personal control. Players can run /ct to flip between Peace and Combat, use /combat or /peace to set a mode directly, and check /combattoggle status for their own tag timers and cooldowns. /combattoggle help lists every command they are allowed to see, while sensitive admin entries stay hidden unless you are an operator.
Operator Toolkit
Admins at OP level 2 gain inspection and override tools: read another player’s state, force Peace or Combat (optionally bypassing guards), manually apply or clear combat tags, reset cooldowns, and resync scoreboard teams plus HUD state for everyone online. Pair those commands with structured logging so your staff pipeline can audit every toggle, PvP decision, and command invocation at DEBUG or INFO.
Visual Polish and Social Clarity
Optional scoreboard team colors tint nameplates red for Combat and blue for Peace, and configurable emoji-style prefixes make state obvious from any camera angle. If another mod already owns teams, disable scoreboard integration and keep the standalone prefixes. Client HUD position supports nine anchors plus custom offsets, scaling, and per-mode visibility, with optional countdown text under the icon.
Installation, Config, and Workflow Tips
Install Minecraft Forge 43.3.0 or newer for 1.19.2, add the Combat Toggle jar to the server’s mods directory, and launch once to generate combattoggle-server.toml under serverconfig in your world save. Client configs land in combattoggle-client.toml for HUD tweaks. If you curate big modpacks and want a smoother routine for grabbing Forge builds, you can adopt a workflow where this mod can be easily installed via the foxygame.net launcher—a convenient, flexible, and modern Minecraft launcher where you can download mods right from the menu—so your testers spend less time juggling folders and more time verifying combat balance.
Key server knobs include cooldown length, tag duration, whether both sides must be in Combat for damage to count, and how cooldowns trigger. Translation keys cover every player-facing string, so you can ship locale files without recompiling. There are no extra library dependencies, which keeps mod lists lean for servers and modpack authors.
Compatibility and Honest Limitations
Combat Toggle targets Java 17 and coexists with many common server stacks, though you should set useScoreboardTeams=false if another mod controls teams. Rare mixin-heavy damage sources might bypass both cancellation layers; report those with logs and configs. Namespace clashes with generic /combat or /peace commands can happen—fall back to /ct or the /combattoggle subcommands if registration order bites you.
Closing Thoughts
Combat Toggle turns opt-in PvP into a first-class Minecraft mechanic: tagging prevents toggle abuse, cooldowns respect builders, vanilla players keep full control via chat, and modded players get tactile feedback through keybinds and HUD overlays. Tune the configs, brief your moderators on the operator tools, and you ship a polished “fight if you want, chill if you do not” culture without carving your world into arbitrary safe zones.