01
Turn on PvP for your version
The setting moved in Minecraft Java version 1.21.9:
- up to 1.21.8, it is the
pvp line in server.properties, true by default. It is only read at startup;
- since 1.21.9, that line no longer exists. It is replaced by the
pvp gamerule, true by default, which applies at once and is set world by world:
/gamerule pvp
/gamerule pvp true
The first command shows the current value: check it after a server update. Other rules matter on a combat server:
keep_inventory: at false, the loser drops their gear, which is what is at stake on a survival PvP server; at true, it suits an arena where people restart again and again;
immediate_respawn: at true, the player respawns without going through the death screen;
show_death_messages: announces each elimination in chat.
These names date from version 1.21.11; the old ones are given in Minecraft gamerules. Difficulty and the other server.properties lines are in server.properties explained.
02
No-PvP zones with WorldGuard
The spawn, the shop or the welcome area must stay safe, otherwise new players get killed as soon as they arrive. The WorldGuard plugin sets rules per area, called regions. After selecting the area with the WorldEdit axe:
/rg define spawn
/rg flag spawn pvp deny
For the reverse logic, a peaceful world with a single combat zone, forbid PvP everywhere and allow it in the arena, whose priority is above that of the global region:
/rg flag __global__ pvp deny
/rg define arene
/rg flag arene pvp allow
/rg flag arene passthrough allow
The passthrough flag stops the arena from blocking building for non-members: it only serves to set combat rules. WorldGuard is meant to restrict combat: leave the pvp gamerule on and remove PvP where you do not want it. Selections, priorities and the other flags are explained in protecting areas with WorldGuard.
03
An arena in a separate world with Multiverse
An arena in a separate world keeps the survival world intact and allows different rules. The Multiverse plugin creates and manages these worlds on Paper or Purpur:
/mv create arene normal --world-type flat
/mv modify arene set pvp true
/mv modify survie set pvp false
/mv tp arene
- a flat world is handy for building a custom arena; you can also import a downloaded arena map with
/mv import;
- each world keeps its own gamerules:
/mv gamerule set followed by the rule, the value and the world name, for example to keep inventory in the arena only;
- in Multiverse version 5, the world name goes before
set; from the console, it is required.
Installation, portals and separate inventories are covered in Multiverse: several worlds on one server.
04
Minecraft version and combat system
Version 1.9 changed combat deeply: a cooldown between two hits (the strength of an attack depends on the time since the previous one), the shield, the off-hand and the sword's sweep attack. The older combat, with no cooldown between hits, is still popular with part of the PvP community. You have two choices:
- current combat, the one of your server's version: no plugin to add, and players find what they know from single-player;
- combat close to the old one on a recent server: the OldCombatMechanics plugin, open source and maintained, lets you set the cooldown, tool damage, knockback or shields module by module. It runs on Paper and the servers derived from it, from 1.9 onwards, and its settings can differ from one world to another: old combat in the arena, current combat in survival. Test it with your version before opening.
To choose the server software, see Paper, Purpur or Spigot.
05
Cheaters and attacks
A PvP server attracts cheaters, who use modified clients (long-range hits, flying, no knockback). The basic protections:
online-mode=true in server.properties: without account verification, anyone can take another player's name;
allow-flight=false, the default value, as long as no plugin makes players fly: the server then kicks those who fly;
- a server-side anti-cheat: GrimAC is an open source anti-cheat that runs on Spigot, Paper, Folia and Fabric. Like any anti-cheat, it can wrongly flag an honest player: read its documentation, set sanctions gradually and check alerts before banning;
- a staff team with precise rights: give moderators the
kick and ban commands without operator status (see Minecraft admin commands).
DDoS attacks often target PvP servers, sometimes launched by an unhappy player or a rival server: they saturate the connection and disconnect everyone mid-fight. No plugin can stop them, because they strike before reaching the server: the host's network has to filter them. The guide protecting a game server against DDoS explains how.
06
On CloudFive
On our Minecraft hosting plans, Anti-DDoS Premium is included, with a profile specific to Minecraft, on our own AS218808 network in France. Paper and Purpur install in one click; you drop WorldGuard, Multiverse or an anti-cheat into the plugins folder with the file manager or over SFTP, and the client area console accepts gamerule, rg and mv commands directly.
Java servers run on Ryzen 9 9950X, with DDR5 memory and NVMe storage. Plans are monthly, with no commitment, from €8, with support in French 7 days a week.
07
Frequently asked questions
How do I turn on PvP on a Minecraft server?
It is on by default. Up to version 1.21.8, it is set with the pvp line in server.properties; since 1.21.9, with the /gamerule pvp true command. Type /gamerule pvp without a value to see the current setting.
Why did the pvp line disappear from server.properties?
In Minecraft Java 1.21.9, the pvp setting in server.properties was replaced by a gamerule with the same name. It is changed in game with /gamerule pvp, with no restart, and applies per world.
How do I turn off PvP at spawn only?
With the WorldGuard plugin: create a region around the spawn with /rg define spawn, then type /rg flag spawn pvp deny. The rest of the world keeps combat.
How do I get 1.8 combat back on a recent server?
The OldCombatMechanics plugin, for Paper and its derivatives, lets you set the hit cooldown, damage and knockback to get close to the old combat. Its settings can differ from one world to another.
Can a plugin protect a PvP server against DDoS?
No. A DDoS attack saturates the connection before the traffic reaches the server: only the host's network can filter it. An anti-cheat plugin protects against modified clients, not against network attacks.