18.0.3
v18.0.3: Visualization API Surface, Resize Raytrace Fix & Selection Sessions
GriefPrevention3D v18.0.3
Wiki: GriefPrevention3D Wiki
Highlights
- Public visualization API surface — Ported the boundary-visualization extension points from the
feature/gpapiaddon-workspacebranch so addons can drive their own claim visuals without reflection. - Improved 3D claim raytrace logic — Fixed a regression where the second click of a 3D subclaim resize could snap back to an existing claim corner, causing the resize to no-op or collapse the claim into a 1-block sliver.
- New claim-selection sessions — Selecting a claim with the modification tool can now keep that claim as the implicit target for follow-up commands (
/trust,/abandonclaim, etc.) until the visualization clears. - Configurable selected-claim messaging — Optional alternate selection messages so addons can present richer "claim selected" UX without overriding
ResizeStart.
Visualization API
The com.griefprevention.visualization and com.griefprevention.events packages are now part of the supported public API. Addons can:
- Listen for
BoundaryVisualizationEventto mutate the boundary set, swap theVisualizationProvider, or short-circuit drawing entirely. - Implement
VisualizationProvider/VisualizationStyleto render claims using their own block palettes, particle effects, glow displays, or packet pipelines. - Call
BoundaryVisualization.visualizeClaim(...),visualizeArea(...), andvisualizeNearbyClaims(...)directly to trigger the same visuals GP uses internally. - Reuse the built-in
FakeBlockVisualization,LegacyFakeBlockVisualization(1.8.8),AntiCheatCompatVisualization, andGlowingVisualization(1.19.3+) implementations.
See Public Api.txt for the full surface and code examples.
Bugfixes
Claim Tools
- Fixed
ClaimToolDispatcher.handleModificationToolrunning the 3D-corner snap raycast unconditionally on the second click of a resize. The snap is now gated byClaimToolInteractionState.shouldAttempt3DCornerSelection, mirroring thePlayerEventHandlerpath. - This resolves the report where dragging a 3D subclaim corner down through transparent blocks (e.g. leaves) did nothing, or occasionally collapsed the claim to a 1-block-thin layer.
- Fetches
PlayerDataonce before the corner raycast so the gate reflects the actual resize/subdivide state.
New Config Options
Two new options under GriefPrevention.Claims in config.yml:
| Key | Default | Effect |
|---|---|---|
UseClaimSelectSessions |
true |
When you start resizing a claim with the modification tool, that claim becomes the implicit target for subsequent commands until the visualization reverts. |
UseClaimSelectedMessages |
false |
When true (and sessions are enabled), replaces the legacy ResizeStart instruction with the contextual ClaimSelected / ClaimSelectedTopLevel / SubdivisionSelected messages. |
Existing servers will pick up the defaults on first load and have the keys persisted to config.yml automatically.
Compatibility
| Category | Support |
|---|---|
| Minecraft Versions | 1.8.8 -> 26.1.x |
| Minimum Java | Java 11 |
| Bukkit API Target | 1.13 |
Migration
No data migration is required.
Existing claims, configs, and player data remain compatible. If you want the new selection behavior off, set:
GriefPrevention:
Claims:
UseClaimSelectSessions: false
UseClaimSelectedMessages: falsePairing
Pairs with GPExpansion v1.1.1 for claim block accrual profile controls. Visualization addons targeting the new public surface should depend on GriefPrevention3D >= 18.0.3.