PvP Toggle gives players control over their PvP status. Players can choose to opt-in or opt-out of player combat, with configurable combat timers and cooldowns to prevent abuse.
- PvP must be enabled in the world configuration. If the world has PvP disabled at the world level, this plugin will have no effect.
- Per-player PvP toggle - Each player can independently enable or disable their PvP status
- Combat protection - Players cannot toggle PvP while actively in combat
- Toggle cooldown - Configurable cooldown between PvP state changes to prevent abuse
- Off timeout - Delay before PvP can be turned off after enabling
- Persistent state - PvP status is saved across server restarts
- Admin controls - Server administrators can view and modify plugin settings in-game
When a player has PvP disabled:
- They cannot damage other players
- They cannot be damaged by other players
If either the attacker or the target has PvP disabled, no damage is dealt.
The combat timer prevents players from disabling PvP mid-fight. After engaging in PvP combat, players must wait for the combat timer to expire before they can change their PvP status. The off timeout (if configured) requires players to keep PvP enabled for a minimum time before turning it off, and will queue the request to disable when used early.
| Command | Description |
|---|---|
/pvp on |
Enable PvP for yourself |
/pvp off |
Disable PvP for yourself |
/pvp status |
Check your current PvP status, combat timer, and cooldown |
| Command | Description |
|---|---|
/pvp admin config |
Display current plugin configuration |
/pvp admin set <key> <value> |
Modify a configuration value |
| Key | Type | Description |
|---|---|---|
combattimer |
seconds | How long after PvP damage before you can toggle (0 to disable) |
cooldown |
seconds | How long between PvP toggles (0 to disable) |
offtimeout |
seconds | Minimum time after enabling PvP before disabling (0 to disable) |
default |
true/false | Default PvP state for new players |
persist |
true/false | Save PvP state across server restarts |
itemprotection |
true/false | Enable item protection for PvP players |
Boolean values accept: true, false, yes, no, on, off, 1, 0
| Setting | Default |
|---|---|
| Combat Timer | 10 seconds |
| Toggle Cooldown | 5 seconds |
| Off Timeout | 0 seconds |
| Default PvP State | Disabled |
| Data Persistence | Enabled |
| Item Protection | Enabled |
- All players can use
/pvp on,/pvp off, and/pvp status - Admin commands require Creative mode permissions
- Build the plugin JAR
- Place in your server's plugins folder
- Restart the server
MIT