Warps
Warps are named teleport points owned by a town. Each warp tracks its weekly visit count so that the warp list can be sorted by popularity, and players can pin warps as favourites.
Model
Field | Type | Description |
|---|---|---|
| UUID | Primary key. |
| UUID | Owning town. |
| String | Unique within the town. |
| location | Stored as |
| UUID | Origin server. |
| int | Transient counter materialised from the |
CRUD
Command | Permission | Effect |
|---|---|---|
|
| Records the player's current position. Must be inside a town claim ( |
|
| Removes the warp. |
| member | Opens the warp menu. |
| depends | Teleports the player. |
/townwarp is registered as a short-form alias.
Teleport
Teleport rejects:
Cause | Message |
|---|---|
Warp does not exist in the selected town |
|
Player is banned from the warp's town |
|
Anyone obstructs the warp location |
|
Successful teleport sends TELEPORTED_TO_WARP and records a row in warp_visits (used to compute weeklyVisits).
WarpListener blocks block placement that would obstruct the warp.
Sorted listing
WarpService.sortedWarps() returns every cached warp ordered by weeklyVisits descending. The %towns_warps% placeholder returns the sorted list as an ItemProvider so menus can paginate it without extra wiring.
Favourites (pins)
Each player can pin warps to their TownPlayerData.favoriteWarps set via the pin-warp action:
The action toggles — pinning an already-pinned warp removes it. Confirmation messages: WARP_PINNED/WARP_UNPINNED.
%towns_favoriteWarps% returns the player's pinned warps as an ItemProvider.
The %warp_pinned% placeholder is true when the viewer has the warp pinned, so you can build a one-menu toggle: