Welcome to the Hangar Open Beta. Please report any issue you encounter on GitHub!
Avatar for castledking

A fork of GriefPrevention that adds 3D subdivisions

Report GriefPrevention3D?

R

19.1.1

GriefPrevention3D v19.1.1

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

Back up GriefPreventionData before updating.

Folia-Supported MySQL & MariaDB Storage

Database storage on Bukkit, Paper, Purpur, and Folia has been rebuilt for regionized multithreading and modern MySQL/MariaDB servers without inflating the universal JAR:

  • Thread-safe JDBC connection pool: Replaces the legacy single shared Connection with a bounded, zero-dependency connection pool (poolSize default 8, automatically 1 for SQLite). Idle connections are validated against maxLifetimeMs / idleTimeoutMs, dead connections dropped by MySQL wait_timeout are transparently replaced with automatic single-retry recovery, and every write executes inside an atomic JDBC transaction (commit / rollback) so a mid-save disconnect can no longer lose claims or player data.
  • Non-blocking async write pipeline: Claim saves, batched saveClaims writes, claim deletions, player claim-block updates, group bonus blocks, and nextClaimID updates capture immutable snapshots on the calling thread and execute asynchronously on an ordered background writer thread. Folia region threads and global tick threads no longer stall on MySQL round-trips, rapid edits to the same claim/player coalesce into a single write, pending writes are cancelled on delete, and all queued changes drain cleanly on server shutdown.
  • Async player pre-login preload: Player claim blocks and preferences are preloaded from the database during AsyncPlayerPreLoginEvent before the player enters a Folia region, while rapid relogs read directly from any unflushed pending write to prevent stale data.
  • Real MySQL 5.7/8.0/8.4 & MariaDB compatibility: Replaced MariaDB-only ALTER TABLE ... ADD COLUMN IF NOT EXISTS and MySQL-illegal TEXT DEFAULT '' migrations with catalog-scoped JDBC metadata checks so schema upgrades work cleanly across MySQL, MariaDB, and SQLite (even on multi-database MySQL servers).
  • Flat-file parity & safer migration: Added database persistence for manual neighbors, allowallneighbors, and per-player glowenabled (/gpglow), restored parentId-first subdivision attachment for nested and 3D subdivisions, and updated flat-file-to-database migration to migrate nested subdivisions recursively and flush all committed data before backing up ClaimData and PlayerData.
  • External driver fallback: Uses server-bundled MySQL/SQLite JDBC drivers automatically and also scans plugins/GriefPreventionData/drivers/*.jar if a custom or standalone driver is needed.
  • Clean shutdown on database startup failure: Guarded onDisable() against a null dataStore so an invalid database configuration disables the plugin cleanly without throwing a NullPointerException.

Configuration

Create plugins/GriefPreventionData/database.properties to enable database storage:

jdbcUrl=jdbc:mysql://127.0.0.1:3306/griefprevention
username=your_user
password=your_password
poolSize=8
connectionTimeoutMs=10000
idleTimeoutMs=300000
maxLifetimeMs=1800000
validationTimeoutSeconds=3
  • Existing credentials configured under GriefPrevention.Database.* in plugins/GriefPreventionData/config.yml are automatically migrated into plugins/GriefPreventionData/database.properties on startup so passwords stay out of config.yml.
  • Backwards-compatible fallback to database.* in plugins/GriefPrevention3D/config.yml is also preserved.

Upgrade notes

  • Restart the server after replacing the jar.
  • Both platforms continue to ship in one universal GriefPrevention3D.jar: Spigot/Paper/Purpur/Folia (1.8 through modern) and Fabric (1.21.2 through 1.21.11, and 26.1 through 26.3). Fabric requires Fabric API.
  • Existing MySQL/MariaDB/SQLite databases gain missing columns (neighbors, allowallneighbors, glowenabled, etc.) automatically on first startup.

Information

Published
November 23, 2026
0Downloads

Platforms

Paper
Paper
1.8.8–26.3