Description
Hearthstead
Hearthstead is a server-side Hytale protection mod that discourages “lawnbasing” and rewards players for building real homes.
Stand inside a structure and run /hearth claim. Hearthstead scans the interior with a bounded flood fill and checks for walls, a roof, optional flooring, an exterior door, and a minimum usable interior. Once approved, the claim protects every chunk touched by the house’s interior footprint.
Protection is tied to the house itself, not to an arbitrary area. If a house is broken or abandoned, protection survives a configurable grace period and then expires.
Server-only. No client mod required.
Features
For players
- House-based claims: intentional building beats large empty claims.
- Irregular and concave layouts are supported; only the real interior footprint counts.
- Multiple rooms can be merged into one house via interior doors (
mergeRooms). - Trusted-player management for shared builds.
- Claim window (
/hearth menu) with trust list, add/remove, and re-check button. - Detailed feedback with
/hearth check(inspection UI + 3D scan of the house). - Claim outline with
/hearth show(green = protected, amber = grace period). - Entry/exit titles and a small status HUD (owner, protection state, grace time left).
- Claims on the world map (own and trusted claims, optionally all claims).
- Intrusion alerts: owners are told when an outsider is blocked in their house.
For admins
- Full in-game settings window (
/hearth admin) for every scanner, protection, and performance setting. Values are validated, including block IDs. - Admin tools to list, inspect, revalidate, and remove claims.
- Three storage backends: JSON, RocksDB, and MariaDB.
- Multi-instance sync across servers via MariaDB, including cross-server notifications.
- One-command migration between backends.
- Performance-minded design: allocation-free flood fill, per-tick validation budget, O(1) chunk lookups, debounced saves.
- Safe handling of unloaded chunks and invalid config values.
For developers
- Public Plugin API with claim lifecycle events (see below).
Commands & Permissions
Only one permission exists: hearthstead.admin. Every other command is available to all players. Admin commands answer with a clear chat message when the permission is missing instead of failing silently.
| Command | Description | Permission |
|---|---|---|
/hearth claim |
Validate your house and create or extend your claim | – |
/hearth check |
Inspect the house structure (UI + 3D scan) | – |
/hearth info |
Owner, chunk count, validity, remaining grace time | – |
/hearth menu |
Open the claim window for the house you stand in | – |
/hearth show |
Show the claim outline for 15 seconds | – |
/hearth unclaim |
Remove your own claim | – |
/hearth trust add/remove <player> |
Manage who may build on your claim | – |
/hearth admin (alias /hearth settings) |
Open the admin settings window | hearthstead.admin |
/hearth tools reload |
Reload config.json (works from console) |
hearthstead.admin |
/hearth tools list [page/player/world] |
List claims | hearthstead.admin |
/hearth tools inspect <claimId/player> |
Full claim details | hearthstead.admin |
/hearth tools revalidate [all/<player>] |
Force an immediate re-check | hearthstead.admin |
/hearth tools unclaim <claimId/player> |
Force-remove a claim | hearthstead.admin |
/hearth tools migrate <json/rocksdb/mariadb> |
Move all claims to another backend | hearthstead.admin |
House Rules
- Flood fill runs over passable cells only. Doors and windows are barriers.
- A fill that reaches the scan boundary or
maxCellsfails as open or too large. - The footprint must be at least 3x3 and have at least
minInteriorCellscells. - Each side needs
minWallBlockssolid blocks. Windows count as wall, doors do not. - At least one door must sit on the exterior. A 1x2 gap counts as a door if
allowGapDoorsis on. minRoofCoverageof the interior columns must be roofed, so chimney holes are tolerated.- With
requireFlooron,minFloorCoverageof the columns need a solid block underneath. - With
mergeRoomson, fully enclosed rooms behind interior doors join the same house. - Two claims can never protect the same chunk.
Protection
- Owners and trusted players can build. Outsiders cannot break, place, damage, or use protected blocks.
protectEntities(default on) blocks entity interaction.protectItemPickup(default off) blocks item pickup.- Fire and unattributed explosions trigger an immediate revalidation of the affected claims.
- A broken house keeps protection for
graceSeconds. Repairs after the deadline do not restore protection, so the house must be reclaimed. Owners get a reminder in the last minute. - After a restart, claims stay unprotected until their first revalidation, so stale data can never grant protection.
Configuration
config.json is created on first start (or edit everything in /hearth admin). A malformed value is reported as an error, and the file is left untouched.
| Key | Default | Meaning |
|---|---|---|
horizontalRadius |
48 | Horizontal scan radius (max 128) |
verticalAbove / verticalBelow |
32 / 8 | Vertical scan extents |
maxCells |
100000 | Flood-fill limit before a house counts as too large |
minWallBlocks |
3 | Solid blocks required per side |
minRoofCoverage |
0.85 | Share of interior columns that must be roofed |
maxRoofGapBlocks |
2 | Allowed roof gap blocks (chimneys) |
minInteriorCells |
12 | Minimum interior volume |
graceSeconds |
300 | Grace period after the house breaks |
validationsPerTick |
2 | Revalidations per world per scheduler pass |
persistDebounceSeconds |
5 | Minimum interval between saves |
mapMarkersEnabled / mapMarkersShowAll |
true / false | World map markers |
notifyOwnerOnIntrusion |
true | Alert owners about blocked intruders |
entryNotices / statusHud |
true / true | Entry titles and status HUD |
autoShowBoundary |
true | Auto-render 3D outlines and /hearth check diagnostics |
disabledWorlds |
[] |
World UUIDs or names where claiming is disabled |
storageType |
"json" |
"json", "rocksdb", or "mariadb" |
multiInstanceSync |
false | Cross-server sync (MariaDB only) |
serverId |
"server-1" |
Unique label per server instance |
syncPollSeconds |
3 | Sync polling interval |
Existing configs keep their values. Raise them manually or via /hearth admin.
Storage Backends
Set storageType in config.json or in /hearth admin. All backends store the same data. Claims stay in memory while the server runs, and the backend persists changes and writes a full snapshot every persistDebounceSeconds.
| Backend | storageType |
Best for |
|---|---|---|
| JSON (default) | "json" |
Single servers, zero setup |
| RocksDB | "rocksdb" |
Single servers with many claims (incremental writes) |
| MariaDB | "mariadb" |
Server networks and multi-instance sync |
JSON & RocksDB
- JSON writes
claims.jsonatomically (temp file + rename), so a crash can't corrupt it. - RocksDB uses the bindings already included in the Hytale server. No downloads are needed. Data lives in
claims.rocksdb/. - If RocksDB can't load on your platform, Hearthstead falls back to
claims.json. Claims are never lost because of a failed backend.
MariaDB
Recommended for networks. The JDBC driver is bundled, and MySQL works too.
1. Create database and user (restrict the host to your game servers where possible):
CREATE DATABASE hearthstead CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
CREATE USER 'hearthstead'@'%' IDENTIFIED BY 'CHANGE_ME';
GRANT ALL PRIVILEGES ON hearthstead.* TO 'hearthstead'@'%';
FLUSH PRIVILEGES;
2. Configure config.json:
"storageType": "mariadb",
"mariadbHost": "127.0.0.1",
"mariadbPort": 3306,
"mariadbDatabase": "hearthstead",
"mariadbUsername": "hearthstead",
"mariadbPassword": "CHANGE_ME",
"mariadbTablePrefix": "hearthstead_"
3. Restart. Tables (hearthstead_claims, hearthstead_sync_log, hearthstead_notifications) are created automatically. Change the prefix if several networks share one database. If the connection fails, the error is logged and Hearthstead falls back to claims.json, so the server still starts.
Multi-Instance Sync (MariaDB only)
"storageType": "mariadb",
"multiInstanceSync": true,
"syncPollSeconds": 3,
"serverId": "lobby-1"
- Point every server at the same database and table prefix.
- Give each server a unique, stable
serverId: no spaces, max 64 characters. It is only a label used to skip a server's own changes. It does not have to match a hostname, IP, or world ID. - Claims created, extended, trusted, or removed on one server appear on the others within
syncPollSeconds. Notifications such as intrusion alerts reach the owner on whichever server they're playing on.
| Server | serverId |
multiInstanceSync |
|---|---|---|
| Lobby | "lobby-1" |
true |
| Survival | "survival-1" |
true |
| Minigames | "minigames-1" |
true |
JSON and RocksDB are single-server backends.
multiInstanceSynchas no effect on them.
Migrating & choosing
/hearth tools migrate <json|rocksdb|mariadb>
This exports all claims to the target backend. Afterwards set storageType and restart. Back up your plugin data folder first.
- One server, normal claim count →
json - One server, heavy claim activity →
rocksdb - Multiple servers, or you want claims in SQL →
mariadb+multiInstanceSync
For Developers: Plugin API
Other plugins can react to claim changes through the public events in com.hearthstead.api.event. Every event carries an immutable ClaimView snapshot (id, owner, world, chunks, trusted players, anchor, validity, grace deadline) taken after the change was persisted.
| Event | Fires when |
|---|---|
ClaimPreCreateEvent |
A claim or re-claim passed validation, before any state changes. Cancellable. isExtending() tells a re-claim from a first claim. |
ClaimCreatedEvent |
A new claim was created and persisted |
ClaimExtendedEvent |
An existing claim was re-claimed or extended |
ClaimRemovedEvent |
Claim removed (OWNER, ADMIN, or REPLACED) |
ClaimGraceStartedEvent |
A valid house broke. Protection continues until getGraceUntil(). |
ClaimRecoveredEvent |
A claim in grace validated again |
ClaimInvalidatedEvent |
Protection lost (GRACE_EXPIRED, LATE_REPAIR, CONFLICT, WORLD_MISSING, NO_GRACE) |
ClaimTrustChangedEvent |
A player was ADDED to or REMOVED from the trust list |
getEventRegistry().register(ClaimCreatedEvent.class, event ->
getLogger().at(Level.INFO).log("Claim " + event.getClaim().id() + " was created"));
- Both
registerandregisterGloballisteners receive every event. - Listeners run synchronously on the thread that changed the claim, usually a world thread. Keep them fast.
- Events fire only after the claim lock is released and the change is saved. Rolled-back saves publish nothing.
- One failing listener never stops the others. A throwing
ClaimPreCreateEventlistener fails open, so a broken plugin can't silently veto claims.
Built for Hytale 0.7.4 [Chapter 1 release] (Java 25).




