File Details
TownsAndNations-0.1.1.jar
- R
- Mar 1, 2026
- 3.03 MB
- 104
- Early Access
File Name
TownsAndNations-0.1.1.jar
Supported Versions
- Early Access
# Plot Management System - Changelog
## New Features
### BorderShower- Added a command to display the town mayor's borders (/town mayor showborder).
- The borders are also displayed when creating a plot.
### Mayor Plot Management GUI
Added a comprehensive GUI system for mayors to manage town plots.
#### **MayorPlotsPage** - Plot List View
- New GUI page accessible via the Mayor Menu navigation bar
- Displays all town plots with detailed information:
- Plot name and coordinates (X and Z ranges)
- Current price
- Sale status ("En Vente" badge for plots marked for sale)
- Owner name (if the plot has been purchased)
- Dynamic list rendering with clickable plot entries
- Empty state message when no plots exist
- Plot counter in header showing total number of plots
#### **EditPlotPage** - Plot Editor
- Dedicated edit page for individual plot management
- **Editable Fields:**
- Plot name (input field)
- Plot price (numeric input)
- For Sale toggle (Yes/No button)
- **Owner Management:**
- Displays current owner information when applicable
- "Remove Owner" button to reclaim plots from citizens
- Automatically clears `ownerUuid`, `ownerName`, and `purchasedAt` fields
- Owner section dynamically shows/hides based on ownership status
- **Actions:**
- Save button - Updates plot details and returns to plot list
- Delete button - Permanently removes the plot using `town.removePositionPlot()`
- Cancel button - Returns to plot list without saving changes
- Real-time UI updates for toggle changes
### Navigation Improvements
- Added "Parcelles" (Plots) tab to Mayor Navigation Bar
- Seamless navigation between Mayor Menu tabs and Plot pages
- Correct back navigation from EditPlotPage to MayorPlotsPage
### Bug Fixes
- Fixed plot deletion not working (switched from `Map.remove()` to `town.removePositionPlot()`)
- Fixed navigation issues causing GUI to close completely
- Resolved dynamic list rendering with proper template append pattern
- Fixed the UI which wasn't working due to an incorrect label
## Localization
### New Translation Keys (EN/FR)
```
gui.mayor.tab.plots = Plots / Parcelles
gui.town.mayor.plots.title = Manage Plots / Gérer les Parcelles
gui.town.mayor.plots.header = Town Plots / Parcelles de la Ville
gui.town.mayor.plots.none = No plots yet / Aucune parcelle pour l'instant
gui.town.mayor.plots.edit = Edit plot details / Modifier les détails de la parcelle
gui.town.mayor.plots.name = Plot Name / Nom de la Parcelle
gui.town.mayor.plots.price = Price / Prix
gui.town.mayor.plots.for_sale = For Sale / En Vente
gui.town.mayor.plots.for_sale_desc = Make this plot available for purchase / Rendre cette parcelle disponible à l'achat
gui.town.mayor.plots.owner = Current Owner / Propriétaire Actuel
gui.town.mayor.plots.remove_owner = Remove Owner / Retirer le Propriétaire
```
## Usage
### For Mayors
1. Open Mayor GUI with `/town mayor gui`
2. Navigate to "Parcelles" tab in the navigation bar
3. View list of all town plots with owners and prices
4. Click any plot to edit its details
5. Adjust price, toggle for-sale status, or remove owners
6. Delete unwanted plots or save changes
### Plot Purchase Flow
When citizens buy plots via `/town plot buy <name>`:
- Money is withdrawn from the player's balance
- Money is deposited into the town's bank
- Plot ownership is transferred to the buyer
- Owner name is displayed in the mayor's plot list
## Future Enhancements (Not Implemented)
- Bulk plot operations
- Plot search/filter functionality
- Plot transfer between citizens
- Plot rental system
- Plot permission management