
GriefPrevention3D
A fork of GriefPrevention that adds 3D subdivisions
- Загрузки
- 3K
- Подписчики
- 6
- Обновлён
- 6 июля 2026 г.
- Лицензия
- GPL-3.0-only
Опубликован 20 июля 2025 г.
The self-service anti-griefing plugin for Minecraft servers — now with full 3D subdivisions
Stop responding to grief and prevent it instead. GriefPrevention stops grief before it starts automatically without any effort from administrators, and with very little (self service) effort from players.
GriefPrevention3D is a fork of the popular GriefPrevention plugin that adds full 3D subdivision support to land claims. Players can now create subdivisions with precise height boundaries for more complex builds.
Watch this video to learn more how GriefPrevention works in-game.
Key Features
- 3D Subdivisions
Create subdivisions with exact Y-level boundaries.
Use this command to switch to 3D subdivision mode./3dsubdivideclaims
- 3D Admin Claims
Create free, height-bounded administrative claims with exact Y coordinates.
Use this command or/3dadminclaims/aclaim mode admin3dto switch to 3D admin claim mode. Requires thegriefprevention.adminclaimspermission.
- Shaped Claims
Set to true to enable non-rectangular claims.AllowShapedClaims: false/shapedclaimsUse this command to switch to the shaped claims mode.
- Merge Claims
Merge two of your claims into a single larger claim.
Stand in the first claim and run/mergeclaims/mergeclaims, then go to the second claim and run/mergeclaimsagain or right-click with your golden shovel. Both claims and the area between them become one claim. Can also be done with/shapedclaims— shape a path that overlaps another claim you own and they merge automatically.
- Nested Subclaims
Set to true to allow subdivisions inside other subdivisions.AllowNestedSubClaims: false
- Visualization Glow
Set to true to enable glowing claim boundary visualization. (Requires 1.19.3+)VisualizationGlow: false
- Unified Command Handler
In GriefPreventionData/alias.yml:
Provides unified commands like:enabled: true/claim create/claim trust/claim abandonView Docs
- Neighbor Trust & Minimum Distance
Enforce a minimum distance between top-level claims to prevent claim spam and overcrowding. When set, players cannot create claims within the configured distance of another player's claim.GriefPrevention: Claims: MinimumDistance: 0/claim trust <player> neighbor— Grant a player neighbor trust so they can bypass minimum distance checks for your claims./neighbortrust <player>(alias:/distancetrust <player>) — Standalone command for the same purpose./claim distance check— Show the configured minimum distance and list nearby claims./claim distance toggle— While standing in your own claim, toggle whether ALL players can bypass minimum distance for that claim.- Existing nearby claims auto-grant neighbor trust to each other, cleaned up automatically when claims are abandoned.
- Wither Explosion Toggle
/witherexplosionsUse this command to toggle wither explosions inside your claim.
Subtle Changes
- Per-Player Locale: Enabled by default. Players receive messages in their client language when a translation is available, falling back to English. Supported languages: Spanish, Portuguese (Brazil), German, French, Russian, Japanese, Chinese (Simplified), Ukrainian, Polish, Turkish. Disable with
PerPlayerLocale: falsein config.yml. - Action Bar Messages: You can now define a list of message keys that should be chosen to be shown in the action bar instead of chat.
- Resizing a claim now selects it and is accessible using common commands like
/claim abandonor/claim trustduring that resize session /restrictsubclaimwhile standing in main claims now instantly restricts all subdivisions inside/trustlistnow shows inherited permissions- Split the
griefprevention.eavesdroppermission togriefprevention.eavesdrop.pm&griefprevention.eavesdrop.softmutefor more granular permission control - Various bug fixes and quality-of-life improvements
- Full compatibility with original GriefPrevention features
- Works with Spigot, Paper, Purpur, and Folia
- Maintains all anti-grief protections
Supported Platforms: Spigot, Paper, Purpur, and Folia.
GriefPrevention3D targets and supports 1.8 - latest available version of these platforms.
Download
⬇ Download the GriefPrevention3D.jar plugin here.
Documentation
For usage instructions, see the official GriefPrevention3D Documentation.
Addons
Addons provide additional features to GriefPrevention. Some of these addons are listed in GitHub Discussions
Support
- 📖 Documentation - Learn how GriefPrevention3D works. Contains answers to most questions.
- Issue Tracker - Report problems or bugs on the issue tracker. Check if someone else reported your issue before posting.
- GitHub Discussions - New ideas, feature requests, or other general discussions.
- Discord Community
Original Plugin
This is a fork of GriefPrevention by RoboMWM.
Ченджлог
18.2.7Релиз26.1.1, 26.1.2, 26.2 · 6 июля 2026 г.
GriefPrevention3D v18.2.7
Wiki: https://github.com/castledking/GriefPrevention3D/wiki
New Features
Per-Claim Alert Toggle (/claim alerts)
- New
alertsEnabledfield onClaim(defaulttrue) /claim alerts [on|off]— toggles alerts for the claim you're standing in/claimtogglealerts [on|off]— toggles alerts for all your claims at once/toggleclaimalerts— alias for/claimtogglealerts- Boundary violation messages (liquid/piston) respect the per-claim toggle: if alerts are disabled for the claim at the violation location, the message is suppressed
Action Bar Message Routing
- New config option
ActionBarMessages(string list underGriefPrevention.) - Default value:
[UnprotectedChestWarning, ExternalLiquidBoundaryViolation, InternalLiquidBoundaryViolation, ExternalPistonBoundaryViolation, InternalPistonBoundaryViolation] - These messages render in the action bar (above the hotbar) instead of chat
- Graceful fallback to chat if
spigot().sendMessage(ChatMessageType.ACTION_BAR)is unavailable ClaimBoundaryViolationTrackerroutes throughGriefPrevention.sendMessageso action bar dispatch works automatically
Rate-Limited Chest Warning
- New config options:
GriefPrevention.Claims.UnprotectedChestWarningCooldownSeconds— default300(5 min)GriefPrevention.Claims.UnprotectedChestWarningDistance— default100(blocks)
- "This chest is NOT protected" message only repeats after the cooldown expires or the player moves farther than the distance threshold from the last warned chest
Lava Placement Near Claims (PreventLavaPlaceNearClaims)
- New config option
GriefPrevention.Claims.PreventLavaPlaceNearClaims— defaulttrue - When enabled and
MinimumDistance > 0, lava placement is blocked if withinMinimumDistanceof any claim - Claim owners bypass the check for their own claims
- Players with neighbor trust on the nearby claim can also place lava
- New message:
NoLavaNearClaim("You are too close to a claim to do that!")
Persistence
Database Schema v11
- New column
alertsenabled(BOOLEAN DEFAULT 1) ingriefprevention_claimdata SQL_INSERT_CLAIMupdated to includealertsenabled- Schema migration auto-adds column if missing
FlatFile (YAML)
- New field
Alerts Enabledin claim YAML files - Defaults to
truewhen reading legacy files without the field
New Messages (all locales updated)
| Key | English Value |
|---|---|
NoLavaNearClaim |
"You are too close to a claim to do that!" |
ClaimAlertsEnabled |
"Alerts enabled for this claim." |
ClaimAlertsDisabled |
"Alerts disabled for this claim." |
ClaimAlertsEnabledGlobal |
"Alerts enabled for all claims." |
ClaimAlertsDisabledGlobal |
"Alerts disabled for all claims." |
ClaimAlertsUsage |
"Use /claimtogglealerts on|off to toggle alerts for ALL claims, or stand in a specific claim and try again." |
Translated versions added to all 14 bundled locale files (messages_*.yml).
Files Changed
M src/main/java/com/griefprevention/commands/UnifiedClaimCommand.java
M src/main/java/com/griefprevention/protection/ClaimBoundaryViolationTracker.java
M src/main/java/me/ryanhamshire/GriefPrevention/Alias.java
M src/main/java/me/ryanhamshire/GriefPrevention/BlockEventHandler.java
M src/main/java/me/ryanhamshire/GriefPrevention/Claim.java
M src/main/java/me/ryanhamshire/GriefPrevention/DataStore.java
M src/main/java/me/ryanhamshire/GriefPrevention/DatabaseDataStore.java
M src/main/java/me/ryanhamshire/GriefPrevention/FlatFileDataStore.java
M src/main/java/me/ryanhamshire/GriefPrevention/GriefPrevention.java
M src/main/java/me/ryanhamshire/GriefPrevention/Messages.java
M src/main/java/me/ryanhamshire/GriefPrevention/PlayerData.java
M src/main/resources/messages.yml
M src/main/resources/messages_*.yml (13 locale files)
M src/main/resources/plugin.yml
18.2.6Релиз26.1.1, 26.1.2, 26.2 · 5 июля 2026 г.
GriefPrevention3D v18.2.6
Wiki: https://github.com/castledking/GriefPrevention3D/wiki
Highlights
PvP toggle messages synced in every non-English locale
The 16 PvP-toggle message keys introduced in v18.2.5 had only been added to the
default messages.yml and messages_en.yml. The 12 non-English locale files still
carried the old single _NoFee / _WithFee keys and were missing the new split / state
/ error / usage keys, causing every PvP toggle prompt (confirmation, fee, success, error)
to silently fall back to English on a non-English server.
This release adds all 16 new keys, with localized translations, in:
messages_de_DE.yml(German)messages_es.yml(Spanish)messages_fr_FR.yml(French)messages_ja_JP.yml(Japanese)messages_ms_MY.yml(Malay)messages_pl_PL.yml(Polish)messages_pt_BR.yml(Portuguese - Brazil)messages_ru_RU.yml(Russian)messages_tr_TR.yml(Turkish)messages_uk_UA.yml(Ukrainian)messages_zh_CN.yml(Chinese - Simplified)messages_en_PT.yml(English - Pirate)
Message keys added
| Key | English default |
|---|---|
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}? |
PvPToggleEnabled |
PvP enabled in this {0}. |
PvPToggleDisabled |
PvP disabled in this {0}. |
PvPToggleEnabledWithFee |
PvP enabled in this {0} for {1}. |
PvPToggleDisabledWithFee |
PvP disabled in this {0} for {1}. |
PvpToggleNotEnabled |
PvP toggle commands are not enabled. |
PvpToggleNotEnabledForClaimType |
PvP cannot be toggled in this type of claim. |
NoPendingPvpToggle |
No pending PvP toggle to confirm. |
PendingPvpToggleExpired |
Your pending PvP toggle has expired. Please try again. |
ConfirmPvpToggleInstruction |
Type /claim pvp {0} confirm or /claimpvpconfirm to confirm. |
PvpToggleUsage |
`Usage: /claim pvp [true |
PvpToggleAlreadyEnabled |
PvP is already enabled in this {0}. |
PvpToggleAlreadyDisabled |
PvP is already disabled in this {0}. |
Fixes
Removes orphan PvP toggle keys from locales
The pre-v18.2.5 generic keys are no longer referenced by the plugin (the /claim pvp
flow now uses the four split _Enabled / _Disabled variants) and were removed from
all 12 non-English locale files so they match the default messages.yml:
ConfirmPvpToggleNoFee(removed)ConfirmPvpToggleWithFee(removed)
18.2.5Релиз26.1.1, 26.1.2, 26.2 · 5 июля 2026 г.
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
PvpToggleContextinner class to bundle fee and claim-type info - Added
VaultEconomyFormattingutility withformat(Server, double)andformat(Economy, double)overloads - Updated
DataStore.createClaim()to inherit PvP state whenconfig_pvp_subdivisionPvpStateisINHERIT - Updated
handleClaimPvpConfirmCommand()to validate edit permission and use message enums - Removed
PvPToggleSuccess/PvPToggleSuccessWithFeemessage keys (replaced by separate enable/disable variants) - Added
ClaimLabel,SubdivisionLabelin Messages enum and resource files - Added
griefprevention.claimpvppermission node as a child ofgriefprevention.claims - Fixed missing
&rreset code instartups.txttemplate
18.2.4Релиз26.1.1, 26.1.2, 26.2 · 3 июля 2026 г.
GriefPrevention3D v18.2.4
Wiki: https://github.com/castledking/GriefPrevention3D/wiki
Features
PvP toggle command improvements
Fixed several bugs in the /claim pvp command to improve usability and reliability.
Optional confirm suffix
The confirm suffix is now optional. Players can use:
/claim pvp true- Shows confirmation message, then type/claim pvp true confirmto execute/claim pvp true confirm- Executes immediately without confirmation prompt
This matches the behavior of other confirmation-based commands in the plugin.
Fixed empty argument handling
Previously, running /claim pvp with no arguments would throw an error. It now shows proper usage:
Usage: /claim pvp <true|false> [confirm]
Improved localization
Added translatable messages for PvP state descriptions:
PvPToggleEnable- Localizable "enable" textPvPToggleDisable- Localizable "disable" text
These are used in confirmation messages instead of hardcoded English text, allowing proper translation.
Fixed placeholder documentation
Added proper placeholder documentation to confirmation messages:
ConfirmPvpToggleNoFee- Documents placeholders {0}, {1}, {2}, {3}ConfirmPvPToggleWithFee- Documents placeholders {0}, {1}, {2}, {3}, {4}
PvP prevention now actually works
The per-claim PvP toggle was previously stored but not enforced. The claimIsPvPSafeZone() method now checks the pvpEnabled field before falling back to global config settings.
When PvP toggling is enabled and a claim has pvpEnabled = false, it is treated as a PvP safe zone and prevents PvP combat regardless of global config settings.
Startup header improvements
Minor formatting improvements to the startup header display:
- Updated
PluginTagmessage to use newline instead of space for better formatting - Removed extra newline from
startups.txttemplate - Removed extra newline from
StartupHeader.buildStartupBlock()method
Shaped claim merge improvements
Improved the merge claims feature when working with shaped claims. When merging shaped claims while standing in the nibbed (indented) portions, the system now creates a rectangle between the claims instead of using a Manhattan path. This approach follows the Minkowski sum principle, resulting in more intuitive and efficient claim merging for complex shaped claims.
Added new fields to track merge state for shaped claims:
mergeSecondEdgeIndex- Tracks the second claim's edge index for shaped claim mergemergeFirstDepthPoint- Player position when first claim merge edge was selected (for nib depth)mergeSecondDepthPoint- Player position when second claim merge edge was selected (for nib depth)
Technical changes
- Added
PvPToggleEnableandPvPToggleDisablemessages to Messages enum - Updated
handlePvpCommand()to handle optional confirm suffix - Added empty argument check in
handlePvpCommand() - Updated confirmation messages to use translatable state strings
- Updated placeholder documentation in
ConfirmPvpToggleNoFeeandConfirmPvPToggleWithFee - Modified
claimIsPvPSafeZone()to checkpvpEnabledfield before global config - Updated
PluginTagmessage format in Messages.java - Removed extra newline from startups.txt template
- Removed extra newline from
StartupHeader.buildStartupBlock()method - Updated plugin.yml usage for claimpvp command to show
[confirm]as optional
18.2.3Релиз26.1.1, 26.1.2, 26.2 · 3 июля 2026 г.
GriefPrevention3D v18.2.3
Wiki: GriefPrevention3D Wiki
Fixes
/claim pvp subcommand now works in the alias system
The /claim pvp subcommand was missing from both the alias configuration and the unified command handler. Running /claim pvp returned "Unknown subcommand" and the generated alias.yml had no PvP section.
Fix:
- Added
ClaimPvpentry toAlias.javawith default alias YAML (commands:[pvp], standalone:[claimpvp]) - Registered the
pvpsubcommand inUnifiedClaimCommand.javawith tab completion fortrue/false/confirm - Registered
ClaimPvpstandalone alias so the alias system can manage/claimpvp - The
config_pvp_toggleCost*gate remains — admins must opt in by settingClaims.PvPToggle.Claim.Enabled: true(or Subdivision) inconfig.yml
Startup console output is now a single log line
The startup header was previously split into individual sendMessage() calls per line, producing separate timestamps. It now sends the entire block as one call, keeping the console log clean.
Features
Malay (ms_MY) locale support
The existing messages_ms_MY.yml file was not registered in MessageLocalization.BUNDLED_LOCALE_FILES or SUPPORTED_LOCALE_CODES. It is now active. Players and servers with config_locale: ms_MY will receive localized messages including the new startup strings.
Per-locale startup console messages
Four new message keys were added to Messages.java:
| Key | English default |
|---|---|
AuthorTag |
&7by castledking, RoboMWM and BigScary |
PluginTag |
&6The self-service anti-griefing plugin for Minecraft servers &b- Now with full 3D subdivisions |
StartupDetails |
&fStartup details: {0} |
BootFinished |
&7Boot finished in: &a{0} |
The startup header in startups.txt was redesigned around these messages. Instead of hardcoding locale-specific text in each en1[] / es1[] / pt1[] block, the file now contains only the locale-agnostic ASCII art (p1/p2/p3) with a single ${startup} placeholder. The combined startup block — author, plugin tag, details header, and boot time — is built at runtime from the configured locale's translations.
This means all 13 supported locales now have localized startup output:
| File | Language |
|---|---|
messages_en.yml |
English |
messages_es.yml |
Spanish |
messages_pt_BR.yml |
Portuguese (Brazil) |
messages_fr_FR.yml |
French |
messages_de_DE.yml |
German |
messages_ru_RU.yml |
Russian |
messages_zh_CN.yml |
Chinese (Simplified) |
messages_ja_JP.yml |
Japanese |
messages_ms_MY.yml |
Malay |
messages_pl_PL.yml |
Polish |
messages_tr_TR.yml |
Turkish |
messages_uk_UA.yml |
Ukrainian |
messages_en_PT.yml |
English (Pirate) |
Adding or customizing startup text for any locale is now a one-line change in the corresponding messages_XX.yml — no need to edit startups.txt or the StartupHeader.java code.
Technical changes
Alias.java: AddedClaimPvpenum entry with YAML defaults and subcommand argumentsUnifiedClaimCommand.java: Registeredpvpsubcommand, standalone alias,handlePvp()delegating toplugin.handleClaimPvpCommand(), andcreatePvpTabExecutor()with tab completionMessageLocalization.java: Addedmessages_ms_MY.ymltoBUNDLED_LOCALE_FILESandms_MYtoSUPPORTED_LOCALE_CODESMessages.java: AddedAuthorTag,PluginTag,StartupDetails,BootFinishedwith docsStartupHeader.java: Rewrote to build${startup}from locale messages; removed${details}/${startup.time}/${LANG_CODE}replacements (now part of the combined block); added locale-fallback-to-any-entry for p1/p2/p3; removedCOL_WIDTHandformatLine/paddead codestartups.txt: Stripped 9 locale-specific entries (en1-3, es1-3, pt1-3); only p1/p2/p3 remain with${startup}placeholdermessages_XX.yml(all 13 locales + root): AddedAuthorTag,PluginTag,StartupDetails,BootFinishedwith localized translationsGriefPrevention.java:displayEnabledHeader()sends one combinedsendMessage()instead of splitting by newline
18.2.2Релиз26.1.1, 26.1.2, 26.2 · 2 июля 2026 г.
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.
/claim pvp <true|false> confirm
A standalone alias is also available:
/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.
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 pvpthrough the unified command handler - Standalone
/claimpvpcommand can be disabled viastandalone: falsein alias.yml - Tab completion support for
true/falsearguments
Technical changes
- Added
Claim.pvpEnabledfield to store per-claim PvP state (default:true) - Added configurable PvP toggle settings under
Claims.PvPTogglein config.yml - Added
handlePvpCommand()for unified command handling - Registered
/claim pvpsubcommand in the unified command handler - Added standalone
/claimpvpcommand in plugin.yml - Added Vault economy integration with balance checks and withdrawals
- Added
pvpenabledcolumn to database schema (schema version 10) - Added
PvP Enabledkey to flatfile YAML serialization - Added pvpEnabled loading in both flatfile and database storage
- Updated alias.yml with
/claim pvpsubcommand and/claimpvpstandalone - Added "merge" option to
/claim modein alias.yml documentation - Updated wiki documentation (Commands.md, Key-Features.md, Configuration.md)
18.2.1Релиз26.1.1, 26.1.2, 26.2 · 1 июля 2026 г.
GriefPrevention3D v18.2.1
Wiki: GriefPrevention3D Wiki
Fixes
/claimlist no longer shows duplicate claims; claim blocks no longer go negative
Fixed a bug where a player's claims could appear duplicated in /claimlist and their available claim blocks would drift negative. The issue affected players after logout or server restart (whenever their PlayerData was freshly created).
Root cause: DataStore.addClaim() added the claim to the global this.claims list first, then called ownerData.getClaims(). When the player's PlayerData was newly created (claims vector == null), getClaims() lazy-initialized by scanning this.claims — finding the same claim — then the caller added it a second time. Each duplicate caused getRemainingClaimBlocks() to subtract the claim's area twice, and /claimlist showed the claim twice.
The same bug existed in changeClaimOwner() (claim transfer).
Fix: Guard both .add() calls with a contains() check so a claim is never double-added to the owner's vector after lazy init already picked it up.
DataStore.java:addClaim()andchangeClaimOwner()now check!ownerClaims.contains(claim)before adding.
18.2.0Релиз26.1.1, 26.1.2, 26.2 · 1 июля 2026 г.
GriefPrevention3D v18.2.0
Wiki: GriefPrevention3D Wiki
Features
DatabaseDataStore now matches FlatFileDataStore feature-for-feature
DatabaseDataStore was missing three persisted fields that FlatFileDataStore has supported for some time. Database users will now get identical behaviour.
3D claims (is3d)
The is3d boolean is now persisted in the griefprevention_claimdata table. Claims created with 3D enabled (subdivisions that respect Y boundaries) will correctly reload after a restart.
- Schema migration v7:
ALTER TABLE griefprevention_claimdata ADD COLUMN IF NOT EXISTS is3d BOOLEAN DEFAULT 0 DatabaseDataStore.java: passesis3dfromResultSettonew Claim(…)instead of hardcodingfalse
Shaped claims (shapecorners)
Shaped claim geometry (non-rectangular orthogonal polygons) is now serialized to a shapecorners TEXT column as semicolon-delimited x,z pairs. Existing rectangular claims are unaffected.
- Schema migration v8:
ALTER TABLE griefprevention_claimdata ADD COLUMN IF NOT EXISTS shapecorners TEXT DEFAULT '' DatabaseDataStore.java:serializeCornersForDb()/parseCornersFromDb()helpers convert betweenList<OrthogonalPoint2i>and the DB text format- Reads are passed to
claim.setShapedCorners()on load
Modified date (modifieddate)
Each claim's last-modified timestamp is stored as a BIGINT (epoch millis). On first save after migration, existing claims without a timestamp will get the current time.
- Schema migration v9:
ALTER TABLE griefprevention_claimdata ADD COLUMN IF NOT EXISTS modifieddate BIGINT DEFAULT 0 DatabaseDataStore.java:claim.modifiedDateis set frommodifieddatecolumn on load (when > 0) and written on every save
Technical details
| Schema version | What changed |
|---|---|
| 7 | Added griefprevention_claimdata.is3d |
| 8 | Added griefprevention_claimdata.shapecorners |
| 9 | Added griefprevention_claimdata.modifieddate |
| 10 | Current latestSchemaVersion |
All migrations use ALTER TABLE … ADD COLUMN IF NOT EXISTS — zero-touch upgrade for existing database users.
Комментарии
Загружаем…
