# GriefPrevention3D v18.2.5
**Wiki:** https://github.com/castledking/GriefPrevention3D/wiki
## Features
### Improved `/claim pvp` command UX
The PvP toggle command has been significantly refactored for better usability and code clarity.
#### Clearer confirmation flow
The confirmation messages have been rewritten to be more explicit about what action will be taken:
- `ConfirmPvpToggleEnabledNoFee` - "Do you want to enable PvP in this {0}?"
- `ConfirmPvpToggleDisabledNoFee` - "Do you want to disable PvP in this {0}?"
- `ConfirmPvpToggleEnabledWithFee` - "Do you want to pay {0} to enable PvP in this {1}?"
- `ConfirmPvpToggleDisabledWithFee` - "Do you want to pay {0} to disable PvP in this {1}?"
Previously all fee/no-fee variants used a single templated message with "enable"/"disable" as a parameter. Now they are separate messages with clear instructions.
#### Already-toggled handling
Running `/claim pvp true` on a claim where PvP is already enabled now shows a specific message instead of silently succeeding.
#### `/claimpvpconfirm` improvements
The `/claimpvpconfirm` command now validates that the player still has edit permission for the claim before executing the toggle, and shows proper error messages (`NoPendingPvpToggle`, `PendingPvpToggleExpired`) instead of hardcoded English strings.
### Vault economy formatting
Added `VaultEconomyFormatting` utility class that formats currency amounts using the active Vault economy provider. When Vault is available, it uses `economy.format()` for locale-aware currency display; falls back to `String.format("%.2f", amount)` otherwise.
Fee amounts in PvP toggle confirmation and success messages now use this formatted display instead of raw `String.format("%.2f", fee)`.
## Technical changes
- Refactored `handlePvpCommand()` into smaller helper methods: `parsePvpToggleArg()`, `getPvpToggleContext()`, `getPvpToggleClaimTypeLabel()`, `sendPvpToggleConfirmation()`, `chargePvpToggleFee()`, `sendPvpToggleSuccess()`, `clearPendingPvpToggle()`
- Introduced `PvpToggleContext` inner class to bundle fee and claim-type info
- Added `VaultEconomyFormatting` utility with `format(Server, double)` and `format(Economy, double)` overloads
- Updated `DataStore.createClaim()` to inherit PvP state when `config_pvp_subdivisionPvpState` is `INHERIT`
- Updated `handleClaimPvpConfirmCommand()` to validate edit permission and use message enums
- Removed `PvPToggleSuccess`/`PvPToggleSuccessWithFee` message keys (replaced by separate enable/disable variants)
- Added `ClaimLabel`, `SubdivisionLabel` in Messages enum and resource files
- Added `griefprevention.claimpvp` permission node as a child of `griefprevention.claims`
- Fixed missing `&r` reset code in `startups.txt` template
Optional dependencies
QuickShop-Hikari
Any compatible version
VaultUnlocked
Any compatible version
PlaceholderAPI
Any compatible version
Developer information
Projects on Modrinth are automatically available through a Maven repository for use with JVM build tools such as Gradle.
maven { name = "Modrinth"; url = "https://api.modrinth.com/maven" }