# Land for sale: plots

> Staff put chunks up for sale with a price and a height cap; players buy one where they stand or from K → Plots, pay in the server's coins, and the FTB Chunks claim moves to their team for good. New in 0.4, off by default.

Source: https://stygion.eu/docs/keystone/plots
Updated: 2026-11-16

Module `plots`, settings in `config/keystone/plots.toml`. Off until you turn it on (`enabled = true`): it moves land and money.

## What players see

- **Walking into a chunk for sale** shows its price and height cap once, with a **Buy** button in chat. With Keystone's client half, chunks for sale also get a faint red edge on the ground (`border.enabled`, `border.colour`, `border.reach`).
- **`/plot buy`** where they stand quotes the price; **Confirm purchase** (or `/plot buy confirm`) within a minute buys it. The quote holds the price: if staff change it in between, nothing is charged.
- **K → Plots** is a map of the land around them - for sale, sold, theirs, their team's - with the price and cap of each chunk; pick one and buy it from there, with a confirm step. The *My plots* tab lists what they own.
- **`/plot info`**, **`/plot list`** - this chunk, and their plots.

A plot is **theirs for good** - no rent, nothing taken back for being away. Above the height cap no block can be placed (staff excepted).

## Paying

**Keystone keeps no balances.** With `currency.kind = items` the price is taken from the buyer's inventory in the coins you list in `coins` - each line is the coin's value in the smallest unit and then the same line `crates.items` takes:

```
coins = ["1 obol stygion:coin_obol look=stygion:coin_obol Obol",
         "8 ember stygion:coin_ember look=stygion:coin_ember Ember Hex",
         "64 seal stygion:coin_seal look=stygion:coin_seal Styx Seal",
         "512 sovereign stygion:coin_sovereign look=stygion:coin_sovereign Stygion Sovereign"]
```

The largest coins go first and change comes back in the largest coins that make it. A coin with a `look=` is matched on Keystone's own mark, never on its name, so a renamed item pays nothing. Prices are written in the smallest unit (`512`) or as a count and a coin (`1sovereign`, `4seal`).

With `currency.kind = command`, another mod's money pays: `currency.take-command` and `currency.give-command` with `{player}`, `{uuid}` and `{amount}`, such as `eco take {player} {amount}`.

## Selling land (staff)

Staff need `keystone.plots.admin`.

| Command | What it does |
|---|---|
| `/plot sell <price> [cap]` | the chunk you stand in, for sale; `cap` is the highest y a block may be placed at, or `none` (`default-cap` when left out) |
| `/plot corner`, then `/plot sell area <price> [cap]` | every chunk between the corner and where you stand (at most `most-area`) |
| `/plot sell radius <chunks> <price> [cap]` | a square around you |
| `/plot unsell [area \| radius <chunks>]` | off sale |
| `/plot cap <y \| none>` | the cap of this chunk, for sale or bought |
| `/plot revoke` | take a bought plot back: the claim goes back to the team that sold it, **nothing is refunded** |

Staff sell only land the claims mod's **server team** holds, or a team listed by **id** in `sellers` (`/plot info` shows staff the id of the team holding a chunk; names are never matched, a team can change its name). Land nobody holds is refused: anybody could claim it free in FTB Chunks, so claim it for the server first.

The editor's **Plots** screen lists every chunk for sale and every plot bought, with the owner, the price, the sales log, the cap and taking off sale or back.

## FTB Chunks, and without it

`keeper`: `auto` (FTB Chunks when it is installed, otherwise Keystone's own record), `ftbchunks` (only FTB Chunks; without it plots sells nothing and says so) or `keystone`.

- **With FTB Chunks** the purchase releases the seller's claim and claims the chunk for the buyer's team **in one go**: if the claim for the buyer fails, the seller's claim is made again and the money goes back. A plot out of a zone does not use up the buyer's own claims: Keystone raises their FTB limit by one for each (`count-in-claim-limit = false`, the default).
- **A claim that lapses** - FTB Chunks' `max_idle_days_before_unclaim`, an admin unclaim, a disbanded team - ends the plot: one that came out of a zone goes **back on sale** at the zone's price and cap, claimed again for the team that sold it. Plots are looked at every few seconds, and only while FTB Chunks has its data loaded.
- **Without a claims mod** Keystone keeps the record itself: a bought plot belongs to its buyer, and with `protect` (on) blocks placed and broken there by anybody else - and in a chunk for sale by anybody but staff - are refused. Containers, entities and explosions are the server's other protection's to guard.

## Players selling to players

Off by default (`player-sales.enabled`). When on, a player with `keystone.plots.sell` puts land up with `/plot sell <price>` in the chunk, or from K → Plots:

- a **bought plot** only its buyer sells; other land of a team only the team's **owner or an officer**;
- the buyer pays the seller less `player-sales.fee` percent (what no coin can pay stays with the fee); a seller who is away is paid when they next join, once;
- if the seller unclaims it, sells it, leaves the team or loses the rank before somebody buys, the purchase is refused and the offer goes off the market;
- land a player sells counts against the buyer's own claim limit, unless it was a zone plot the seller had outside theirs (then the extra claim moves with it).

## Safe by construction

A purchase runs on the server thread from start to end: two players pressing Buy in the same tick, a double click or leaving mid-way never charge twice or make two owners. The money is taken slot by slot only if every slot still holds what was counted; the claim is handed over all or nothing; change, the seller's money and the record follow only then. Every sale is kept in the sales log for good.

## Settings

| Setting | Default | |
|---|---|---|
| `enabled` | false | the whole module; read once, when the server starts, so turning it on takes a restart |
| `keeper` | `auto` | who keeps the land |
| `currency.kind` | `items` | `items` or `command` |
| `coins` | empty | the coins and their values |
| `currency.take-command`, `currency.give-command`, `currency.unit` | empty | another mod's money |
| `most-per-player` | 0 | plots one player may own, 0 for no limit |
| `count-in-claim-limit` | false | whether zone plots count against the FTB limit |
| `sellers` | empty | team ids besides the server's whose land staff sell |
| `default-cap` | `none` | the cap when `/plot sell` names none |
| `player-sales.enabled`, `player-sales.fee` | false, 0 | players selling to players |
| `player-sales.return-days` | 30 | a plot a player sold goes back to them when the buyer's claim lapses, if somebody in the seller's team was on within this many days; otherwise the server offers it (at the zone's price, or at what the buyer paid). 0: never back to the seller |
| `protect` | true | Keystone's own protection without a claims mod |
| `notify` | true | the line when walking into a chunk for sale |
| `border.enabled`, `border.colour`, `border.reach` | true, `#e5484d`, 3 | the red edge (client half) |
| `most-area` | 1024 | chunks one area command may take |

Who may: `keystone.plots` (everybody, given to `default`), `keystone.plots.sell` (selling one's own land, `default`, works only with `player-sales.enabled`), `keystone.plots.admin` (staff).

## For your own tools

`GET /v1/plots` and `GET /v1/plots/sales` (scope `plots.read`); `POST /v1/plots/offer`, `/withdraw`, `/cap`, `/revoke` (owner scope `plots.write`). Every change is the `PlotChanged` event (`offered`, `changed`, `withdrawn`, `bought`, `revoked`, `lapsed`) for a web map, a Discord bot or your own ledger.
