# GriefPrevention3D v18.2.2
**Wiki:** https://github.com/castledking/GriefPrevention3D/wiki
## Features
### PvP can now be toggled per claim and subdivision
Added a new `/claim pvp` command that allows claim owners to enable or disable PvP inside their claims. The command works in both top-level claims and subdivisions, allowing different PvP rules for individual subdivisions if desired.
```text
/claim pvp <true|false> confirm
```
A standalone alias is also available:
```text
/claimpvp <true|false> confirm
```
Like `/abandonclaim`, the command requires a `confirm` suffix before making any changes.
### Configurable claim and subdivision support
PvP toggling is disabled by default and can be enabled independently for main claims and subdivisions.
```yaml
Claims:
PvPToggle:
Claim:
Enabled: true
Price: 0.0
Subdivision:
Enabled: true
Price: 0.0
DefaultState: INHERIT
```
Each scope has its own configurable economy cost, allowing servers to charge different prices (or no price at all) for claim and subdivision PvP changes.
### Subdivision inheritance
New subdivisions can either inherit their parent claim's current PvP state or always use a configured default.
**`INHERIT` (default)**
- New subdivisions copy the parent claim's current PvP state.
- Existing subdivisions are unaffected if the parent is changed later.
**`DEFAULT`**
- Every new subdivision starts with the configured default PvP state regardless of its parent.
### Economy integration
If a toggle price greater than `0` is configured:
- Requires Vault and a supported economy plugin.
- Players must have enough money before confirming.
- Payment is only taken after confirmation.
- Clear error messages are shown if payment fails.
### Persistence
The PvP state is persisted across server restarts in both flatfile and database storage.
### Alias system support
The `/claim pvp` subcommand is fully integrated with the alias system:
- Available as `/claim pvp` through the unified command handler
- Standalone `/claimpvp` command can be disabled via `standalone: false` in alias.yml
- Tab completion support for `true`/`false` arguments
## Technical changes
- Added `Claim.pvpEnabled` field to store per-claim PvP state (default: `true`)
- Added configurable PvP toggle settings under `Claims.PvPToggle` in config.yml
- Added `handlePvpCommand()` for unified command handling
- Registered `/claim pvp` subcommand in the unified command handler
- Added standalone `/claimpvp` command in plugin.yml
- Added Vault economy integration with balance checks and withdrawals
- Added `pvpenabled` column to database schema (schema version 10)
- Added `PvP Enabled` key to flatfile YAML serialization
- Added pvpEnabled loading in both flatfile and database storage
- Updated alias.yml with `/claim pvp` subcommand and `/claimpvp` standalone
- Added "merge" option to `/claim mode` in alias.yml documentation
- Updated wiki documentation (Commands.md, Key-Features.md, Configuration.md)
Optional dependencies
VaultUnlocked
Any compatible version
QuickShop-Hikari
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" }