-
Notifications
You must be signed in to change notification settings - Fork 0
Towny Integration
Towny is a soft dependency. Exchequer runs fully without it, and automatically upgrades its behavior when Towny is detected on startup.
| Feature | Without Towny | With Towny |
|---|---|---|
| Treasury | Personal, per player | Nation and town level, shared |
| GDP | Calculated per player | Calculated per nation |
| Governance | Not applicable | Mayors and kings can set local tax rates and specialization |
| Trade routes | Not available | Available between nations |
| Town shares | Not available | Nations can issue tradeable shares |
| Sanctions and embargoes | Not applicable | Available if a diplomacy addon is also present |
Exchequer requires a version of Towny that supports Paper, Purpur, or Folia (0.102.0.0 or later). Towny no longer supports Spigot or CraftBukkit as of that version, so this restriction is inherited rather than something Exchequer imposes independently.
On startup, Exchequer checks whether Towny is enabled and sets an internal flag the rest of the plugin checks before calling any Towny specific logic. This is a runtime check, not a hard dependency, so installing or removing Towny and restarting the server is enough to switch modes. There is no manual configuration step required to enable or disable Towny integration itself, though you may want to review the treasury and governance related config sections after switching either direction.
Wherever Exchequer needs to determine whose treasury a player's trade or deposit affects, it resolves this automatically: if Towny is present and the player belongs to a town, their nation's treasury and GDP apply. If Towny is absent, or the player isn't in a town, their personal treasury applies instead. This resolution happens transparently, players do not need to do anything differently regardless of which context they're in.
If you add Towny to a server that's already been running Exchequer standalone, existing personal treasury balances are not automatically migrated into a nation treasury. Players keep their personal balances, and nation treasuries start fresh once players are in towns. There is currently no automated migration tool for converting personal balances into nation treasury contributions, this would need to be handled manually if desired.