Repository navigation
Releases
Releases · AnchorlightDev/ConsentPvP
v1.2.0
Added
- Duels.
/pvp duel <player>,/pvp acceptand/pvp denygive two players a one-off fight without changing either player's own setting. Duels end on death, logout or a time limit. - Server-wide override for events.
/pvp force onlets everyone fight whatever their setting,/pvp force offstops all PvP (duels included), and/pvp force clearputs everyone back as they were. It survives restarts, and the console warns on startup while one is active. - New-player protection. New players can't turn PvP on until they have played for a configurable time. Staff can lift it with
/pvp newbie clear <player>. - Respawn protection. Players can't take PvP damage for a few seconds after respawning. Attacking someone ends it early.
- Staff commands from the console:
/pvp check <player>and/pvp set <player> on|off, alongside the existing staff commands. - Clickable buttons.
/pvpshows[Enable]/[Disable], and a blocked attacker who has PvP off gets an[Enable PvP]button. - Bedrock support. Bedrock players get a native form instead of chat buttons (requires Floodgate).
- First-join explainer telling new players how consent works.
- Folia support. Name tag prefixes are turned off on Folia.
- Developer API.
ConsentPvPAPI(canFight,hasConsent,isDueling,getOverride) through Bukkit's ServicesManager, and a cancellablePvPConsentChangeEvent. - bStats metrics and an update checker, both of which can be turned off.
Improved PvP Protection
- Only harmful potion effects are blocked; healing and other beneficial effects always apply, including the beneficial part of a mixed potion.
- Lingering potion clouds are blamed on the player who threw them, with throttled notices.
- Fire aspect and flame arrows no longer set non-consenting players alight.
- Tamed pets count as their owner, for both damage and knockback.
- End crystals blame the player who set them off before the one who placed them.
- Lava, fire, respawn anchors and beds are traced to the right player. Your own bed or anchor, and lava or fire nobody placed, still hurt you.
- Splash potion denials hide vanished and invisible players' names.
- PvP that another plugin (such as WorldGuard) has already cancelled is left alone and produces no denial message.
Changed
- Every message is now in
config.yml, and config updates keep your comments and customised messages. - A
config.ymlwith a syntax error is never overwritten. The plugin runs on the built-in defaults until it is fixed and reloaded. - Toggling to the setting you already have does nothing and starts no cooldown.
- Durations are shown as "4m 32s".
- Player data is saved off the main thread.
- Tab completion only offers commands the player is allowed to use.
Upgrading
Drop in the new jar and restart. Your config.yml values and playerdata.yml are kept, and new settings are added to config.yml automatically.
Requires Paper (or a fork) 1.21.x, or Folia, and Java 21+.
v1.1.0
Added
- Added
/pvp statusto show your current PvP consent state. - Added
/pvp reloadfor admins to reload the plugin configuration without restarting the server. - Added
/pvp deathfor admins to toggle whether PvP is automatically disabled when a player dies. - Added
/pvp bypass <player>for admins to clear a player’s PvP toggle cooldown. - Added tab completion for
/pvpsubcommands and player names for bypass. - Added configurable PvP status indicators above player name tags.
- Added support for showing PvP-denial messages in either chat or the action bar.
- Added optional defender notifications when a PvP attempt is denied.
- Added anonymous PvP-denial messages for cases involving invisible or unidentified players.
- Added automatic default config merging so new config options are applied to existing configs.
Improved PvP Protection
- Improved detection of indirect PvP damage sources, including:
- Projectiles
- TNT
- End crystals
- Explosive minecarts
- Splash potions
- Lingering potions
- Respawn anchors
- Lava
- Fire
- Explosions
- Knockback and push attacks
- Sweep and mace-style area attacks
- Added ownership tracking for end crystals, respawn anchors, lava, and fire.
- Prevented non-consensual damage from player-placed lava and fire.
- Prevented non-consensual explosion damage where possible.
- Prevented vanished players from attacking visible players.
- Reduced message spam from sweep-style attacks and area damage.
Changed
/pvpwith no arguments now shows the player’s current PvP status instead of only showing usage text.- PvP enable/disable now updates the player’s name tag indicator immediately.
Fixed / Maintenance
- Cleaned up generated Maven build files.
- Updated project IDE config from JDK 24 to JDK 21.
- Added cleanup for name tag scoreboard teams when the plugin disables.
v1.0.0
Added /pvp enable and /pvp disable commands for toggling PvP consent.
Implemented configurable cooldowns to prevent frequent toggling.
Provided customizable in-game messages and MiniMessage formatting.
Added permission controls for standard users and admins.
Enforced PvP consent rules by blocking damage and potion effects between non-consenting players.
Automatic cleanup of expired cooldowns and offline player data to maintain performance.