How It Works

QuestLines Claims protects land by intercepting block, interaction, and combat events and checking whether the acting player is allowed to perform that action at the target position. Permission is resolved by walking a four-step chain and stopping at the first match:

  1. Admin regions that contain the position, highest priority first.
  2. Rent/Buy regions that contain the position.
  3. Player claim at the position’s chunk, if any.
  4. Wilderness defaults (global flag set with optional per-player overrides).

At every layer, members with an explicit entry check their per-member flag allow-list first; otherwise the layer’s default flag set applies. Players with questlinesclaims.admin bypass all protection checks.

Standalone plugin

QuestLines Claims does not require QuestLines Core. It ships independently as questlines-claims-{version}.jar and stores its data under mods/QuestLinesClaims/.

Region Types

Four kinds of protected area can exist on the server. Player claims are chunk-based; admin, rent, and buy regions are arbitrary rectangles in blocks (optionally extended vertically to the full world height).

Type Shape Created via Notes
Player Claim Contiguous chunks /claim map Owned by a single player; has members with flag permissions. A player can have multiple claims, each independently contiguous.
Admin Region Block-aligned box /claim wand + /claim admin Protected zone with a numeric priority. The highest-priority region wins when regions overlap. Supports per-flag block/item exclusions.
Rent Region Block-aligned box /claim admin (with price + duration) Leased for a fixed duration. Expiry triggers a grace period; unpaid leases are reset via the saved prefab.
Buy Region Block-aligned box /claim admin (with price) One-time purchase. The buyer becomes the region owner; no expiry.

Permission Flags

Every region and claim has a default flag set (what non-members can do) plus a per-member flag set (what each listed member can do). A flag being in the set means the action is allowed.

Flag Grants
BUILDPlacing blocks.
BREAKBreaking blocks and harvesting crops.
INTERACTUsing buttons, levers, entity interactions, and non-container world interactions.
CONTAINEROpening chests, barrels, furnaces, and other containers.
DOOROpening doors, trapdoors, and gates.
PVPTaking or dealing PvP damage while inside the region.
FRIENDLY_FIREDamage between two trusted members of the same region (owner/member/tenant). When disabled, damage between trusted pairs is blocked even if PVP is allowed.
ENTRYWalking into the region. Players who lack ENTRY are teleported back to their last allowed position.
PORTALUsing portals inside the region.
SITSitting on chairs and other seatable blocks.

Flag Exclusions

Admin regions can whitelist specific block or item IDs for a denied flag. Patterns are case-insensitive and support * wildcards (e.g. *stone, Iron_*, *_door*). This is useful for spawn regions that should deny BREAK broadly but still allow chopping trees.

Wilderness Flags

Unclaimed land uses the wilderness_flags config entry (all flags enabled by default). Admins can override the wilderness flag set for specific players via /claim manage run outside any claim or region.

Priority Resolution

When multiple regions cover the same block, admin regions are sorted by their priority field (descending) and only the top region is consulted. The resolution order for a given (world, x, y, z) is:

  1. Highest-priority admin region at that position (if any).
  2. First rent or buy region at that position.
  3. Player claim that owns the position’s chunk.
  4. Wilderness defaults.

Admin regions cover any player claim they overlap — players cannot claim chunks that intersect an admin, rent, or buy region.

Player Claims

Players use /claim map to open a grid of chunk cells centred on their current position. Green cells are unclaimed and can be clicked to claim; cells in the player’s own claims are shown in that claim’s colour and can be managed; cells owned by others or under admin regions are read-only.

Contiguity

Claims must be a single contiguous chunk group (4-way adjacency). Adding a chunk requires it to be adjacent to an existing chunk in that claim. Removing a chunk that would split the claim into disconnected pieces is refused (a breadth-first search verifies remaining chunks stay connected).

Chunk Limits

Every player has a total-chunk budget across all their claims. The budget is:

  • default_max_chunks (default 25) — base from config.
  • + N for every questlinesclaims.claim.chunks.N permission the player holds. Multiple matching permissions stack (N = 1–500).
  • + bonus — admin-granted chunks via /claim addchunks.

Claim Separation

The distance_between_claims config value (default 1 chunk) sets a minimum buffer between claims of different players. Set to 0 to allow claims to touch.

Claim Colours

Each claim is assigned a random vivid HSV colour on creation. Owners can pick a specific colour or re-roll at random through the claim map UI. The colour appears as an overlay on the world map so players can see claim boundaries at a glance.

Members and Flags

Claim owners open /claim members (inside their claim) or use the Members button in the claim map to add trusted players. Each member has their own allowed-flag set; unlisted players fall back to the member default flags set for the claim.

Admin Regions

Admins define rectangular protected regions with a wand workflow:

  1. Run /claim wand to receive the Claim Staff.
  2. Left-click a block to set Pos1, right-click a block to set Pos2.
  3. A selection box outline renders between the two corners.
  4. Run /claim admin to open the admin region list, then Create from Wand Selection.

The creation form asks for name, priority, type (Admin / Rent / Buy), and — for rent/buy — price and duration. Checking Expand Y extends the region vertically to cover the full world height regardless of the clicked Y coordinates.

Claim Staff

The Claim Staff is a Hytale item defined in Server/Item/Items/QuestLinesClaims_Staff.json. It is identified by an item NBT tag, so the underlying model can be swapped without code changes. The wand session is in-memory only and resets if the player disconnects.

Rent and Buy Regions

Rent and buy regions require VaultUnlocked. Players browse them via /claim rentbuy, which opens a filtered list of available, owned, and locked plots.

Buying

Buy regions are a one-time purchase. On confirmation the price is withdrawn from the player and they become the region owner for as long as the region exists. Buy regions have no expiry and no grace period.

Renting

Rent regions have a price and a durationSeconds. The rent cycle begins when the tenant rents the plot; the lease renewal timer fires at leaseStart + durationSeconds.

The RentExpireTask runs on a scheduled executor (rent_check_interval seconds, default 300). On each tick it:

  1. Sends warning notifications at each configured expiry_warn_times threshold that hasn’t fired yet.
  2. When the lease expires, attempts to withdraw another full cycle of rent from the tenant. If that succeeds, leaseEnd advances by durationSeconds and the lease continues.
  3. If the renewal fails (insufficient funds), the region enters a locked state: all members and the tenant lose access, and a countdown to reset begins.
  4. After rent_grace_days days in the locked state, the region’s tenancy is cleared and, if a schematic was saved, the saved prefab is pasted back to restore the region to its original state.

When refund_on_reset=true, the pro-rated remaining lease value is refunded to the tenant on reset. Default is false.

Notifications

Expiry warnings, lock notices, and reset notices are sent both as a NotificationUtil toast (if the tenant is online) and as a chat message. If the tenant is offline, the message is stored as a PendingNotification and flushed to chat on their next connect.

Schematics

Rent/Buy regions can have an associated prefab captured from the region volume. Saving is triggered from the admin region edit UI and runs on the world executor via the Hytale PrefabSaver. Prefabs are stored under prefabs/questlinesclaims/<regionId>.prefab and are pasted back on rent reset (and can be manually restored from the admin UI).

Commands

Root command: /claim.

Player Commands

Command Permission Description
/claim help none List all /claim subcommands in chat.
/claim info none Show details about the region or claim the player is standing in.
/claim map
aliases: /claim c, /claim claims
questlinesclaims.claim.use Open the chunk claim map centred on the player. Standing in own claim opens it in edit mode; standing in wilderness opens it in new-claim mode; standing in another player’s claim is refused.
/claim members none Open the members UI for the claim the player is standing in. Only the owner may open it.
/claim manage none (context-dependent) Open the appropriate member manager at the player’s position: their own claim, a rent region they hold, or a buy region they own. Admins can manage any region, any claim, or the wilderness member list from this command.
/claim rentbuy questlinesclaims.claim.use Open the Rent/Buy Browser to view and transact on available plots.

Admin Commands

All commands below require questlinesclaims.admin.

Command Description
/claim wand Give yourself the Claim Staff and reset your wand selection.
/claim admin Open the admin region list UI to create, edit, delete, and save prefabs.
/claim create Shortcut for the admin region edit form, pre-filled with the player’s current wand selection if set.
/claim addchunks <username> <amount> Grant a player extra bonus chunks on top of their permission-based limit.
/claim setowner <username> Transfer ownership of the claim at the player’s current chunk to another player. Chunk count is checked against the new owner’s limit (admins exempt). Pass server to transfer to the server pseudo-player.
/claim reload Reload plugin configs from disk.

Configuration

All plugin-level settings live in mods/QuestLinesClaims/questlinesclaims.conf. Missing keys are written back with defaults on first load.

Key Default Description
default_max_chunks 25 Base chunk budget for every player. Permissions and bonus grants add to this.
map_grid_size 15 Side length of the claim map grid. Rounded up to the next odd number.
distance_between_claims 1 Minimum chunk buffer between different players’ claims. 0 disables the check.
wilderness_flags all Comma-separated flag names allowed in unclaimed land (e.g. BUILD,BREAK,INTERACT,CONTAINER,DOOR,PVP).
rent_check_interval 300 Seconds between RentExpireTask runs.
rent_grace_days 3 Days a locked rent region stays locked before being reset.
expiry_warn_times 7d,1d,1h Comma-separated duration strings (e.g. 7d, 12h, 30m, 1d2h) marking how far before lease expiry a warning fires.
refund_on_reset false When true, the pro-rated remaining lease balance is refunded to the tenant on reset.

Database

Region and claim data is stored in a SQL database. SQLite is the default and keeps a local file at mods/QuestLinesClaims/claims.db. Switch to MySQL or MariaDB by setting database_type and filling in the connection parameters. Database changes require a server restart.

Key Default Description
database_typesqlitesqlite, mysql, or mariadb.
database_hostlocalhostRemote database host (ignored for SQLite).
database_port3306Remote database port.
database_namequestlinesclaimsSchema / database name.
database_userrootConnection user.
database_passwordemptyConnection password.
database_use_sslfalseRequest SSL in the JDBC URL.
database_extra_paramsemptyRaw parameters appended to the JDBC URL.

Permissions

Permission Default Description
questlinesclaims.admin false Full admin access: wand, admin UI, region CRUD, schematic saves, /claim setowner, /claim addchunks, /claim reload, manage any claim or region, and bypass all protection checks (including ENTRY).
questlinesclaims.claim.use true Required to open /claim map and /claim rentbuy.
questlinesclaims.claim.chunks.<N> false Adds N chunks to the player’s claim budget. Multiple matching permissions stack (N ranges 1–500). Use a permission manager to grant e.g. questlinesclaims.claim.chunks.50 for a +50 tier.

Integrations

VaultUnlocked

Rent and buy features require VaultUnlocked. At startup Claims probes for net.cfh.vault.VaultUnlockedServicesManager; if absent, economy is disabled, and rent/buy transactions return ECONOMY_UNAVAILABLE. Withdrawals and refunds go through the standard Vault economy object so any Vault-backed currency plugin works transparently.

World Map

Claims installs its own IWorldMapProvider that draws the usual terrain plus an overlay of claim colours and admin region boundaries. Invalidation is automatic: claiming, unclaiming, renaming, or recolouring a claim triggers a redraw of the affected chunks plus their neighbours.

Entry & Title Systems

Two ECS ticking systems run per-player while they are in-world:

  • ClaimTitleSystem — shows a short title announcement when a player crosses into a new claim or region. Admin regions show in cyan, player claims show in the owner’s claim colour, wilderness shows in green as “Wilderness”.
  • EntryEnforcementSystem — remembers the player’s last allowed position and teleports them back when they enter a position where the ENTRY flag is denied. Admins bypass this check.

File Layout

Path Purpose
mods/QuestLinesClaims/questlinesclaims.conf Plugin-level settings (chunk limits, rent tuning, wilderness flags, database connection).
mods/QuestLinesClaims/claims.db SQLite store (when database_type=sqlite). Holds admin regions, rent/buy regions, player claims, region members, chunks, per-player data, and pending notifications.
prefabs/questlinesclaims/<regionId>.prefab Saved prefab snapshots for rent/buy regions, restored on reset.