AstralTown Overview
AstralTown is the land-claim, town-governance, and player-organisation plugin for AstralRealms. Players create towns, claim chunks, define roles, invite members, build subzones with their own rules, drop warps, and run a town bank — all driven from YAML configuration and the AstralCore action / placeholder framework.
Highlights
Area | Summary |
|---|---|
Towns | Create, rename, MOTD, spawn, ownership transfer, disband — fully network-aware. |
Roles | Per-town role registry with 83 typed permissions and configurable default roles. |
Members | Invitation flow, kick, leave, bans with reasons, online roster. |
Claims | Per-chunk claims with adjacency rules, distance-from-spawn floor, formula-based cost. |
Settings | 27 togglable environment flags (PvP, mob spawning, fire spread, …) per town. |
Subzones | Cuboid regions inside a town with their own roles, members, and setting overrides. |
Warps | Town-defined teleport points, weekly-visit tracking, per-player favourite pins. |
Bank | Deposit / withdraw economy. |
Town chat | Private chat channel routed through AstralChat. |
Audit logs | Typed |
Visualisation | Particle borders around claims and subzones + BlueMap polygons. |
API |
|
Requirements
Dependency | Required | Notes |
|---|---|---|
Paper 1.21+ | Yes | — |
AstralCore | Yes | Menus, dialogs, actions, placeholders, configuration framework. |
AstralSync | Yes | Persists |
AstralChat | Yes | Town chat is wired through the |
MariaDB / PostgreSQL | Yes | Twelve tables, schema applied automatically. |
Redis | Yes | Distributed cache for towns, claims, members. |
RabbitMQ | Yes | Cross-server synchronisation of mutations. |
BlueMap | Optional | When present, claims are rendered as 3D polygons on the web map. |
Architecture at a glance
Services exposed by the plugin
Getter | Use |
|---|---|
| Town CRUD, name validation, network sync. |
| Chunk claim management, cost formula, auto-claim. |
| Role create / edit / delete dialog flow. |
| Invitations, kicks, role assignment. |
| Invitation lifecycle. |
| Per-town bans. |
| Deposit / withdraw. |
| Warp CRUD + visit tracking. |
| Subzone creation, edit, members, roles. |
| Town settings toggle + dirty tracking. |
| Town chat broadcast, cross-server. |
| Audit-log writes & queries. |
| Particle visualisation jobs. |
| Menu container. |
See Developer API for the full surface.
Pipeline overview
Permission enforcement happens passively too: PermissionListener checks every block / interaction event against the town's permissions, and SettingsListener filters environment events by the town's TownSettings.