| description | Technical architecture of eHome database connection pools, Linux hosting path resolution, and safe teleportation mechanics. |
|---|
eHome is backed by an asynchronous database engine powered by HikariCP, engineered to manage tens of thousands of homes across high-population servers with zero main-thread hitching.
eHome shades HikariCP 6.2.0 to provide rapid, fail-safe connection handling:
- Connection Timeout: Enforces a 5-second fail-fast timeout to prevent blocking server threads during connection drops.
- Leak Detection: Built-in connection lifecycle monitors prevent memory and pool leaks.
- Non-Blocking Async DAOs: All database operations run asynchronously using
CompletableFuturedispatched via the platform's scheduler.
On cloud hosting environments (such as Pterodactyl, Docker containers, and Linux VPS), standard SQLite drivers can fail with path to database does not exist if directories have case-sensitivity differences or parent directories do not exist prior to pool connection.
eHome incorporates an intelligent Self-Healing Path Resolver:
- Inspects
/plugins/to locate the exact plugin folder (case-insensitively). - Recursively ensures parent directories are created using modern NIO (
Files.createDirectories). - Explicitly initializes the database file (
createNewFile()) before HikariCP touches the disk. - Guarantees 100% plug-and-play operation across any cloud host without manual permission fixes.
Upon startup, eHome's built-in migrator automatically deploys schema definitions:
Stores all player home coordinates, world dimensions, and customization states:
player_uuid(VARCHAR 36) — Unique identifier of the home owner.name(VARCHAR 32) — Normalized home name.world(VARCHAR 64) — World identifier.x,y,z(DOUBLE) — Exact coordinate locations.yaw,pitch(FLOAT) — Player view angle orientation.bed_icon(VARCHAR 32) — Selected bed color material name (default:WHITE_BED).is_pinned(BOOLEAN) — Pinned favorite priority flag.created_at,updated_at(BIGINT) — Unix epoch timestamps for activity tracking and purge calculations.
Tracks active invitations for the /home share system:
target_uuid(VARCHAR 36) — Invited player's UUID.sender_uuid(VARCHAR 36) — Inviting host's UUID.home_name(VARCHAR 32) — Target home name.expires_at(BIGINT) — Auto-expiration timestamp (default: 60 seconds).
To protect player equipment and hardcore gameplay, eHome executes a rigorous safety scan before initiating teleports:
- Suffocation Checks: The destination feet and head blocks must not be solid, suffocating blocks.
- Hazard Detection: Destination and surrounding blocks cannot be lava, fire, campfire, sweet berry bushes, or wither roses.
- Void & Liquid Checks: Teleportation into open void or hazardous liquids is automatically aborted.
- Adaptive Bed Placement: If the location is safe, the player spawns centered facing their saved yaw and pitch.