Discord
Towny: towns and nations
Wiki - Plugins

Towny: the towns and nations plugin

Towny Advanced is one of the most mature plugins for Minecraft. It lets players found towns, claim plots, form nations, collect taxes and wage wars. It runs on Paper, Spigot and Purpur from version 1.16 up and has been under active development for more than 15 years.

Reading time: ~10 min Platform: Paper / Spigot / Purpur

What Towny is

Towny Advanced (usually just called Towny) is a land-protection plugin that adds a complete political and economic system to a Minecraft server. Instead of individual claims like in GriefPrevention, Towny organizes players around towns, and each town collectively manages an area of land divided into plots.

The plugin's history goes back to 2010, which makes it one of the longest-developed plugins in the whole history of Minecraft. Over the years it has become the standard for survival servers with a dose of politics and economy. You will find it on the vast majority of "towny survival" or "economy survival" servers around the world.

Towny has four levels of political structure:

  • Resident: every player on the server. A resident can join a town or found their own
  • Town: a group of players sharing an area under the leadership of a mayor
  • Nation: an alliance of towns under one king. It gives bonuses and handles politics between towns
  • World: each dimension (the Overworld, the Nether, the End) can have its own Towny settings

You can download the plugin for free from the official GitHub repository. It requires Java 17+ and runs on Paper/Spigot 1.16.5+. For full economy features it needs Vault and an economy plugin (for example EssentialsX).

Creating a town

Founding a town is the first step for any player who wants land of their own. Before you type the command, make sure you have enough money: the admin can set a cost for founding a town (typically $500-$5000).

/t new TownName        # founds a new town at your current location
/t claim               # claims the chunk you're standing in (costs money)
/t unclaim             # gives the chunk back to the wilderness
/t claim outpost       # creates a remote outpost

The town is founded in the chunk you're standing in when you type the command. That chunk becomes the homeblock, the heart of the town. The town spawn (/t spawn) is set there automatically. The homeblock can't be moved without moving the whole spawn point, so choose the location carefully.

After founding the town you can gradually buy neighboring chunks with /t claim. Each chunk costs a one-time fee (set by the admin) and counts toward the town's plot limit. The base limit is usually 8-16 plots, but it grows with the number of residents: every new resident adds a bonus to the pool of available plots.

The base formula for the default configuration:

Max plots = (residents + 1) * bonus_per_resident

For example, a town with 10 residents and a bonus of 8 plots per resident can claim 88 chunks. That is a huge area, which is why recruiting residents is a key strategy.

It is also worth planning the shape of your town. Chunks have to touch each other (or be outposts). Loosely scattered islands of claims aren't possible: every new chunk must border one you have already claimed. The exception is outposts (/t claim outpost), which can be far from the rest but cost much more.

Managing plots

Every claimed chunk is one plot. By default all plots in a town belong to the town and are managed by the mayor. You can, however, assign a plot to a specific resident or give it a special type.

Plot types

Towny defines several plot types, each with different default permissions:

  • Default: the standard town plot. Permissions are controlled by the town settings
  • Shop: a commercial plot. Set with /plot set shop. Outside players can trade here even if the rest of the town is closed
  • Embassy: a plot that a player from another town, or even a homeless one, can buy or rent. Useful for building trade districts
  • Farm: an agricultural plot. Outside players can harvest crops but can't destroy the farm's structures
  • Arena: a PvP plot. PvP is always on here, regardless of the general server and town settings
  • Wilds: a plot treated like land outside the town, with total freedom to destroy
  • Inn: lets homeless players set their spawn on this plot
  • Jail: a plot where punished town residents are sent
/plot set shop         # changes the plot type to shop
/plot set embassy      # changes the plot type to embassy
/plot set farm         # changes the plot type to farm
/plot set arena        # changes the plot type to a PvP arena
/plot set name Name    # gives the plot a custom name
/plot forsale 500      # puts the plot up for sale for $500
/plot notforsale       # takes the plot off the market

Permissions on plots

Each plot has independent permissions for four groups: Resident (town residents), Nation (players from the same nation), Ally (allies) and Outsider (everyone else). Permissions come in four types: Build, Destroy, Switch (using levers, buttons, chests) and ItemUse (using items such as buckets).

/plot perm set outsider build off    # stops outsiders from building
/plot perm set resident switch on    # residents can use buttons
/plot perm set ally destroy on       # allies can destroy on this plot

Nations

A nation is a higher level of organization above towns. One player (the king) founds the nation and invites other towns into it. A nation can do diplomacy: form alliances with other nations, declare enemies and organize joint war efforts.

/n new NationName        # founds a nation (the mayor pays the founding cost)
/n add TownName          # invites a town into the nation
/n kick TownName         # removes a town from the nation
/n ally add NationName   # sends an alliance proposal to another nation
/n enemy add NationName  # declares an enemy (required for war in some modes)
/n spawn                 # teleports to the nation capital
/n deposit amount        # deposits into the nation bank
/n withdraw amount       # withdraws from the nation bank (king only)

The benefits of belonging to a nation are tangible. Every town in a nation gets a bonus to its maximum number of plots: by default +10 plots for being in a nation, plus extra chunks for the size of the nation. Large nations with many towns can give each town a bonus of 50-100 extra plots.

A nation has a shared bank (the nation bank) from which the king can fund wars and diplomacy or subsidize smaller towns. Running a nation costs a certain amount every day. If the bank runs dry, the nation collapses and all its towns go back to being independent.

Power structure in a nation

  • King: the founder or appointed leader of the nation. Full control over the bank, diplomacy and structure
  • Nation Assistant: can manage towns and diplomacy but has no access to the bank
  • Capital: the king's town. It gives bonuses to the whole nation. Change the capital with /n set capital TownName

Ranks and permissions

Towny has a built-in rank system that is independent of LuckPerms. Each town can create its own custom ranks with any set of Towny permissions.

Default ranks in a town

  • Mayor: full control over the town. Can claim plots, collect taxes, kick players and appoint assistants and ranks. One per town
  • Assistant: can manage residents, plots and town settings. Can't claim or release plots outside the assigned area
  • VIP: an example custom rank. The admin can define any ranks with any permissions
  • New resident (Nomad/default): a standard resident with no special permissions beyond those granted by the town
/t rank add Player RankName      # gives a player a rank in the town
/t rank remove Player RankName   # removes the rank
/t set mayor Player              # hands the mayor title to another player

Custom ranks are configured in plugins/Towny/settings/townyperms.yml. You can create ranks like "Builder", "Guard" or "Merchant", each with its own set of Towny commands the player is allowed to run.

Permissions on your own plots vs other people's

Each resident can set permissions on plots that belong directly to them (assigned by the mayor). On town plots (unassigned), only the mayor or an assistant sets permissions. That is an important difference: a player can have "their" plot and full control over it even though it formally belongs to the town.

Economy and taxes

Towny adds an extensive financial system. Every town has its own bank, which receives taxes from residents and manual deposits. The town bank pays for the town's upkeep (a daily cost) and any war expenses.

Taxes

/t set taxes 50          # sets a daily tax of $50 on every resident
/t set taxes 5%          # a percentage tax on the player's balance (instead of a flat amount)
/t set plottax 10        # a tax on every assigned plot (daily)
/t set plotprice 200     # the price for a resident to buy a plot
/t set shoptax 20        # an extra tax on shop-type plots

Taxes are collected automatically once a day (at Towny's "new day" time, which the admin can configure). If a player can't afford the tax, they may be kicked out of the town automatically. This depends on the admin's configuration.

Town bank and deposits

/t deposit 1000          # deposits $1000 from your wallet into the town bank
/t withdraw 500          # withdraws from the bank (mayor or assistant only)
/t balance               # shows the town bank balance

The town bank is separate from players' wallets. The money in the bank belongs to the town: even if the mayor leaves, the bank stays. When a new mayor takes over the town, the bank goes with it.

Upkeep

Every town pays a daily upkeep proportional to its number of plots, or a flat rate set by the admin. If the town bank can't cover the upkeep, the town falls: all plots go back to the wilderness and the residents become homeless. It is a mechanism that forces activity and contributing to the bank.

Nations pay their own upkeep too. Large nations with many towns pay more, which is a natural brake on expansion and an incentive to build active empires rather than dead ones.

War (Towny War)

Towny offers several war modes. By default, servers run Towny with no active wars, and the admin picks the mechanic that fits the server's concept.

Conflict modes

  • No wars (Off): full protection, no PvP tied to the political system. Suitable for family-friendly servers
  • Towny War Event: recurring war events announced by an admin or run automatically. For a set period (a weekend, say) towns can attack enemy plots
  • Town Sieges: a modern mode from the official Towny-Sieges add-on. Players besiege a town for a set time, and the outcome of the siege decides who takes control
  • Flag War: a flag mode. Attackers have to plant a flag on an enemy plot and defend it for a set time to capture it

How Siege War works

Siege War (available as a separate plugin for Towny) is the most popular war mode on modern servers. A siege goes like this:

  1. An attacking player (who must be from a nation that is an enemy) places a banner near the center of the town under attack
  2. The siege countdown starts (3 days by default). Both sides can score points by killing enemies in the siege zone
  3. When time runs out, if the attackers have more points, the town pays war reparations. Optionally it can be absorbed into the attacking nation
  4. A siege can be repelled: the defenders have to collect more points than the attackers

Siege War doesn't automatically delete towns. It is more a political lever (forcing reparations, changing alliances) than a mechanism of total conquest. That keeps servers with Siege War dynamic without being destructive.

Commands

Player commands: town

Command Description
/t Shows information about your own town
/t TownName Shows information about any town
/t new TownName Founds a new town
/t join TownName Joins an open town
/t leave Leaves your current town
/t add Player Invites a player to the town (mayor)
/t kick Player Kicks a player out of the town (mayor)
/t claim Claims the chunk you're standing in
/t unclaim Releases the chunk from your claims
/t spawn Teleports to the town spawn
/t spawn TownName Teleports to another town's spawn (if it's public)
/t set spawn Sets the town spawn at your current location (mayor)
/t set board Text Sets the town description shown when someone walks onto a plot
/t toggle open Toggles open mode (players can join without an invite)
/t toggle pvp Turns PvP in the town on or off
/t toggle fire Turns fire spread in the town on or off
/t delete Deletes the town (irreversible, mayor only)

Player commands: nation

Command Description
/n Information about your own nation
/n new NationName Founds a nation (you have to be a mayor)
/n add TownName Invites a town into the nation (king)
/n ally add NationName Proposes an alliance to another nation
/n enemy add NationName Declares a nation an enemy
/n spawn Teleports to the nation capital

Admin commands

/ta town new TownName Player      # creates a town for a player at no cost
/ta town delete TownName          # deletes a town
/ta nation new NationName Player  # creates a nation
/ta givebonus TownName 20         # gives a town a bonus of +20 plots
/ta regenerate TownName           # restores terrain after destruction
/ta unclaim circle 5              # releases plots within a 5-chunk radius
/ta reload                        # reloads the Towny configuration

Configuration

Towny keeps its configuration in the plugins/Towny/settings/ directory. The main files are:

  • config.yml: the central configuration: costs, limits, taxes, intervals, mechanics
  • townyperms.yml: Towny permissions for player groups and for ranks in towns and nations
  • language/: all of the plugin's texts, available for editing

The most important config.yml parameters

# Costs
new_town_price: 1000.0           # cost of founding a town
new_nation_price: 5000.0         # cost of founding a nation
claim_price: 200.0               # price for claiming one chunk
claim_price_per_plot: true       # whether the price grows with each claim

# Upkeep, charged once a day
town_upkeep: 100.0               # base cost of town upkeep
town_upkeep_multiplied: false    # if true: upkeep * number_of_plots
nation_upkeep: 1000.0            # cost of nation upkeep

# Plot limits
max_plots_per_resident: 8        # how many plots one resident can assign to themselves
default_town_plots: 8            # starting number of plots for a new town
plots_per_resident: 8            # plot bonus for each resident

# Towny new day (when taxes and upkeep are collected)
new_day_time: "0:00"             # server time of the new day

# Protection
prevent_explosions: true         # blocks explosions inside towns
prevent_fire_spread: true        # blocks fire spread
prevent_mob_damage_blocks: true  # mobs don't destroy blocks in towns

# PvP
town_pvp: false                  # default PvP in new towns (OFF)
nation_zone_pvp: false           # PvP in the nation zone

Currency setup and Vault integration

Towny automatically detects Vault and uses whichever economy plugin is connected to it. Make sure Vault is installed, because Towny checks for it when the server starts.

Towny Chat

Chat channels come from TownyChat, the official Towny chat add-on (a separate plugin):

  • /tc: town chat (only the residents of your town see it)
  • /nc: nation chat (all towns in the nation)

The message format for each channel is configured in chatconfig.yml. You can add placeholders such as {townname}, {nationname} and {rank} to the chat formats.

Tips for admins

First launch

Before players join the server, go through config.yml and set costs that fit your economy. The most common mistakes are costs that are too low (every player founds a town on day one) or too high (nobody founds a town for a week). A good balance is a town founding cost equal to 2-3 days of active play.

  • Set upkeep above zero: without upkeep, dead towns clutter the map forever. Upkeep forces activity or the decay of inactive towns
  • Turn on deny_unclaim_when_bankrupt: without it, players can release plots when the bank is empty to avoid debt. Block that
  • Limit how close towns can claim to each other: the min_distance_from_town_homeblock parameter enforces a minimum distance between towns. 5 chunks is the default minimum; raise it to 10-15 for bigger buffers
  • Turn on town_ruin_time: instead of deleting a bankrupt town immediately, it can go into a "ruins" state for a few days, keeping its structures. Players can buy it back, or it is deleted after the time runs out
  • Use /ta regenerate with care: terrain regeneration after destruction is irreversible. Always make a backup

Integrations with other plugins

  • Vault: required. Towny's economy doesn't work without it
  • EssentialsX: the most commonly used economy engine compatible with Vault
  • LuckPerms: integrates with Towny ranks through the towny_rank context. You can give LuckPerms ranks automatically based on a Towny rank (for example, the mayor gets the "Mayor" prefix)
  • Dynmap-Towny: a Dynmap add-on that draws town and nation borders on the online map. Very popular on Towny servers: players can see the politics of the world without logging in
  • ShopGUI+ / QuickShop Hikari: shops running on the Vault economy work great with Towny taxes. Players earn in shops and spend on keeping their towns running

Common problems and fixes

  • Players can't claim: check the plot limit (/t shows used/max). Raise the bonus with /ta givebonus, or lower max_plots_per_resident to free up more room
  • Taxes aren't being collected: make sure the server is running at the time set as new_day_time. If the server restarts at that moment, it may skip the collection
  • A town disappears after a restart: this is probably a database problem. Towny can use flatfile (yml files) or MySQL/MariaDB. On large servers always use MySQL, because flatfile can get corrupted
  • "Town already exists" errors: check for old data in plugins/Towny/data/. Files sometimes stay behind for deleted towns

Backing up Towny data

Towny data (if you use flatfile) is stored in plugins/Towny/data/. Back this folder up along with the rest of the server. If you use MySQL, standard database dumps are enough. Towny also makes its own backups in plugins/Towny/backups/, and the number of backups kept is set with backup_count.

Related articles: EssentialsX, Vault, LuckPerms, plugin catalog.