Skip to content

v18.2.7: Alerts, Action Bars, Lava Protection & Chest Spam Prevention

Latest

Choose a tag to compare

@castledking castledking released this 06 Jul 09:23

GriefPrevention3D v18.2.7

Wiki: https://github.com/castledking/GriefPrevention3D/wiki

New Features

Per-Claim Alert Toggle (/claim alerts)

  • New alertsEnabled field on Claim (default true)
  • /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 under GriefPrevention.)
  • 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
  • ClaimBoundaryViolationTracker routes through GriefPrevention.sendMessage so action bar dispatch works automatically

Rate-Limited Chest Warning

  • New config options:
    • GriefPrevention.Claims.UnprotectedChestWarningCooldownSeconds — default 300 (5 min)
    • GriefPrevention.Claims.UnprotectedChestWarningDistance — default 100 (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 — default true
  • When enabled and MinimumDistance > 0, lava placement is blocked if within MinimumDistance of 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) in griefprevention_claimdata
  • SQL_INSERT_CLAIM updated to include alertsenabled
  • Schema migration auto-adds column if missing

FlatFile (YAML)

  • New field Alerts Enabled in claim YAML files
  • Defaults to true when 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