A fork of GriefPrevention that adds 3D subdivisions
GriefPrevention3D v18.3.12
Wiki: https://github.com/castledking/GriefPrevention3D/wiki
Overview
Fix for the per-claim PvP toggle: claims that players turned PvP off before v18.3.10 had PvP enabled again after upgrading, on servers whose global config allows combat in claims. From a player's point of view, "PvP is enabled in all claims".
Root cause
v18.3.10 introduced an explicit-toggle marker (PvP Toggle Set / the pvptoggled column) so that
claims nobody ever toggled fall back to the global PvP.ProtectPlayersInLandClaims.* settings
instead of being treated as PvP-on by default.
Claims saved before that release had PvP Enabled: false but no marker. They loaded as
never-toggled, so claimIsPvPSafeZone ignored their stored "off" and used the global config
instead. On servers where ProtectPlayersInLandClaims.PlayerOwnedClaims is false — typical for
servers that let owners opt out of PvP per claim, and the default when siege is enabled in any
world — every claim players had disabled became a PvP zone again. Claims toggled after upgrading got
the marker and worked, which made the problem easy to miss when testing.
Fix
A claim's stored PvP state can only differ from the default (on) because someone explicitly turned
PvP off — through /claimpvp false confirm, or a subdivision inheriting a disabled parent. So a
stored PvP Enabled: false now counts as an explicit toggle when the claim loads, from both
flat-file and database storage.
- Claims disabled before v18.3.10 are protected again as soon as v18.3.12 starts — no commands or data changes needed.
- Claims nobody ever toggled still follow the global
ProtectPlayersInLandClaimssettings. - Flat-file saves only write the
PvP Toggle Setmarker for claims explicitly toggled on, since "off" already implies it. Existing claim files and cross-platform (Fabric) claim documents are not rewritten with redundant fields.
New regression tests cover legacy disabled claims and subdivisions staying protected while the global config allows combat, and untoggled claims still following the global config.
Upgrade notes
No configuration or storage changes. Drop-in replacement for v18.3.11.
Claims explicitly toggled on before v18.3.10 are stored identically to the default and can't be
told apart; they keep following the global config until /claimpvp true confirm is run on them
again.
If players expect claims that were never toggled to be protected, make sure
GriefPrevention.PvP.ProtectPlayersInLandClaims.PlayerOwnedClaims is true in config.yml.