Towny

Towny is a plugin for a  Minecraft server. The plugin itself is a manager for a Resident-Town-Nation hierarchy, as well as a block permission manager for a grid-like protection system. Each town has a mayor, while a nation has a king. They both have their own assistants to help run their respective people. Players can also purchase land from the town, as well as an optional daily tax set by the mayor. The player can allow his friends from out of town to build on his land when even his very own town’s people can’t build if he so wishes.

The basis of protection follows under how the world is separated into chunks. For those unaware, minecraft servers are broken up into 16x16x384 sections of blocks. The 384 being the height from the bedrock floor to the clouds in the sky. The protection ignores the height and focuses on the x and z planes. The default size for grid squares is 16×16, similar to the chunk size (configurable when you start using towny). So claiming a townblock (a grid square) allows that section of land to follow your town’s or the plot owner’s permissions.

Each town can claim up to a certain amount of townblocks, a set ratio or amount configured in the setting that is relative to the amount of players taking residence in that town. Residents themselves have no limit on how many they claim, however the daily tax (when using alongside an economy plugin) will take a bite out of their resources. The money is tunneled to the town’s bank account that only the mayor can withdraw from, except if the town belongs to a nation. Any town belonging to a nation may be required to pay the nation a daily upkeep as well.

 

Why Towny?

One of Towny’s strongest points is the ability for a server admin to configure Towny to their liking and then let the players make their decisions from there. There’s no selection-wands, no players claiming odd-shaped regions to troll other players. Players can go it alone or they can ally into complex groupings. Players can do their own claiming, customize their protections in-game, kill, spawn, teleport, etc. all according to how the server admin has configured Towny.


Features

Towny includes a wide variety of features to offer instant enhancements to your traditional Minecraft server.

  • Allows players to own and manage land based on a pre-set grid layout.
    • Players join towns and purchase plots of land.
    • Players decide who can build, destroy, use “switchs” and use items on every plot they control.
    • Towns can join together into nations, further structuring a server into teams.
    • Towns grant protection from monsters, pvp, fire, explosions and griefing.
  • Wilderness Rules
    • Area between towns is wilderness, with its own build permissions.
    • Limit players’ interaction with the wild to just harvest-able blocks, keeping the wild pristine.
    • Roll-back tnt, creeper, wither explosions, dragon damage and endermen block-moving.
    • Block explosions and fire.

 

 

The Hierarchy

Nomads

Nomads are simply players who are not part of any town. They are landless and their permission nodes are configurable via TownyPerms.yml. Nomads can purchase Embassy plots if they have been given towny.command.plot.claim in the Townyperms.yml. Nomads automatically receive the towny.townless permission node.

Residents

Every person who joins your server can become a resident of a town, (by default they are given the towny.town.resident permission node in townyperms.yml’s nomad section.) Residents have their own command /resident which used by itself outputs a Resident Status Screen, displaying Money, Town, Plots owned and Friends. Residents can join towns or choose to start a town of their own.

Residents can also be put into one town automatically when they join the server for the first time by setting default_town_name: '' in the config.yml.

Residents who join towns can claim plots that the Mayor of the town has set for sale. When a resident owns 1 or more plots, they will see a new line on their Resident Screen, showing plots owned and a default perm line showing the plot perms given on all plots that resident owns, (which haven’t had a custom plot line set.)

Residents have their permission nodes configurable via TownyPerms.yml.

Towns

Click here for Major Graft's Towns & Nations VideoA town is a collection of residents (or just one resident) with one resident as the mayor. A town also has a bank which the mayor can withdraw from. A mayor can also have assistants who have the same powers as him/herself. Towns can have taxes that will be taken at the end of each day interval.

Towns usually grow outwards from their home block, the townblock the mayor stood in during town creation. Townblocks need to be claimed beside other townblocks, unless the mayor claims an outpost in the wilderness using /t claim outpost. Towns can be limited to a number of residents using the config option global_town_settings.max_residents_per_town, by default this is not limited. All of the towns on a server can be seen in a list using /town list.

As of Towny 0.95.1.0 it is possible to store MetaData on a town, see here for details.

Mayors

Mayors run towns and with the help of their assistants, manage a town and its residents. Mayors have their permission nodes configurable via TownyPerms.yml.

Mayors can decide which ranks their residents fall into, in their town. This can be a Town Assistant or any other custom ranks created by the server admin in the townyperms.yml file. Mayors can see the available ranks using /town ranklist command. Players are ranked using /town rank {add|remove} {playername} {rankname}. A player can have more than one rank assigned, allowing admins to create diverse town-roles such as bankers, builders, inviters for the mayor to choose for their trusted residents.

Mayors also determine what sort of tax and tax rates the town will charge the residents.

It is not possible to run two towns unless you are also an admin. An admin can do the following to manage two or more towns:

Example: Admin Bob / How to create NPC Towns.

Admin Bob wants to have a server-town, and his own town. Bob would start by creating his Server Town and setting up taxes, plotprices, permissions. This sort of town should not give residents, allies or outsiders permissions in the Server Town.

Bob can give himself more townblocks using the /ta givebonus {townname} {#} command.

When Bob is finished making his town the way he wants he uses /townyadmin set mayor {townname} npc to place a fake ‘npc’ resident as mayor of the Server Town. This is usually enough to protect the Spawn areas of most servers.

Then Bob leaves Server Town and creates his own town. Using the /townyadmin set mayor {townname} npc command Bob can flip back and forth between towns.

Bob doesn’t have to leave his town to add players to the Server Town though! He can use /townyadmin town {townname} add {playername} to add players to the Server Town or set default_town_name: ‘Server_Town’ in the config.yml.

Bob can also add the NPC town into a nation using /ta nation {nation} add {town}.

As of Towny 0.95.1.0 mayors have the ability to set titles (prefixes) and surnames (postfixes) to the residents of their town. This is done with:

  • /town set title {name} titlegoeshere
  • /town set surname {name} surnamegoeshere

Outlaws

As of Towny 0.92.0.0, towns (typically mayors by default, but possibly other town ranks,) can set a list of Outlaws. Outlaws are set using /town outlaw [add/remove] [name] and the command requires the towny.command.town.outlaw permission node. Outlaws can be any player and do not have to be in a town or nation.

If the newly-minted outlaw is a member of your town they will be kicked. Towns that have themselves set to Open-status (anyone can join using the /town join command,) can use the outlaw list to prevent these players from joining their town freely. Players cannot spawn to public towns which consider them outlaws.

Players that enter into a town where they are considered to be an outlaw will see a warning-title-message informing them. If a player is online and they are made into an Outlaw they will see a message in chat.

Outlaws can be jailed if they die in the town where they are considered to be an outlaw. This requires the jail.is_jailing_attacking_outlaws option in the Towny config.yml to be set to true. It also requires the person who’s done the killing to have the towny.outlaw.jailer permission node. It also requires the town to own at least one jail plot. By default only Mayors, Assistants and Sheriff ranks have the towny.outlaw.jailer permission node.

A town member can view their town’s outlaw list using /town outlawlist. Anyone can view any town’s outlawlist using /town outlawlist {townname}

As of Towny 0.96.4.0 you can optionally have outlaws teleport away from the towns they’re not allowed in. When allow_outlaws_to_enter_town is set to false in the Towny config.yml outlaws will be teleported away. The outlaw_teleport_warmup setting will determine how quickly this will happen, when set to 0 it will be instant or it can be any number of seconds.

Nations

Click here for Major Graft's Towns & Nations VideoA nation is a collection of towns (or just one town) with one town as the capital. The mayor of that capital is the nation leader. A nation can join the war event, as well as ally other nations. A nation also has it’s own bank. It can also tax the towns that belong to it.

Nations can also have a spawn reached using /nation spawn which if the nation is considered ‘Public’ can be reached by nearly any non-enemy players.

Two nations can decide to join in an alliance, which allows them to be protected from friendly fire, help on each others plots (if the plot’s perm line allows allies,) and to help each other in war.

Nations can grant many perks to their towns which can increase as the nation population increases, these include:

  • Bonus townblocks to be claimed.
  • Cheaper town upkeep costs.
  • Larger surrounding NationZones.
  • An increased outpost limit.

Nation Leaders

Nation Leaders lead Nations and are the mayor of the capital city. Leaders have their permission nodes configurable via TownyPerms.yml. Leaders can decide which ranks their residents fall into, in their nation. This can be a Nation Assistant or any other custom ranks created by the server admin in the townyperms.yml file. Leaders can see the available ranks using /nation ranklist command. Players are ranked using /nation rank {add|remove} {playername} {rankname}. A player can have more than one rank assigned, allowing admins to create diverse nation-roles such as bankers, inviters for the leader to choose for their trusted residents.

Leaders have the ability to set titles (prefixes) and surnames (postfixes) to the residents of the towns they have in their nation. This is done with:

  • /nation set title {name} titlegoeshere
  • /nation set surname {name} surnamegoeshere

Typing the commands with nothing after the player’s name resets the title or surname to blank.

 


How Towns Grow

Starting a Town

Mayors start towns using the command /town new {townname}. This will often require an amount of money set in the config at price_new_town.

The townblock they are standing in will be the home block for the town, the exact spot/position will be the spawn point for the town. A mayor can move the spawn point within the homeblock using /t set spawn. The homeblock can be moved to another claimed townblock using /t set homeblock.

More townblocks can be claimed using /town claim. These townblocks need to be directly adjacent to already claimed townblocks, unless it is an outpost.

Joining Towns

There are two ways to join towns, the first is by being invited by a Mayor or a Town assistant. The second is by joining an open town.

Mayors and assistants can add players to their town with the command /town add {playername}. The player will receive a prompt to either /accept or /deny the invitation.

Mayors can set their towns to open using /town toggle open. A player who isn’t in a town already can use the command /town join {townname} to join open towns. Open towns can be viewed using the /town list by open.

When residents join towns they increase the number of townblocks accessible to the mayor for claiming.


Plot System of Land Ownership

Town Blocks

Towny provides a server admin a hands-off approach to block-protection. Block protection is broken down into plots of land, called townblocks, which by default are 16x16x256 (the full height of the world.) Think of them as cells on a uniform grid, all aligned and with no space in between each other, every one the same size. Townblocks are claimed by town mayors who can then sell/give individual plots to their town’s residents.

Claiming Townblocks

Towns’ residents can claim townblocks for the town as long as they have the right permission nodes. By default this is restricted to Mayors and people with the Assistant rank. The player uses /town claim or /town claim # or /town claim rect|circle #|auto or /town claim auto to claim townblocks for their town.

command result
/town claim Claims one plot, where the player is standing.
/town claim # Claims a square with a radius equal to the given #, sometimes down-sizing the radius to make a perfect square, surrounding the command user.
/town claim rect # Claims a square with a radius equal to the given #, sometimes down-sizing the radius to make a perfect square, surrounding the command user.
/town claim rect auto Claims all possible townblocks in a square shape, centered around the command user.
/town claim circle # Claims a circle with a radius equal to the given #, sometimes down-sizing the radius to make a perfect circle, surrounding the command user.
/town claim circle auto Claims all possible townblocks in a circle shape, centered around the command user.
/town claim auto Claims all possible townblocks in a square shape centered around the command user.

Using the /town command will list how many townblocks are available to be claimed.

Plot Groups

Plots can be grouped together into plot groups. This allows plots to be sold/bought and manipulated as if it were one Plot. To create a group a player must have the proper permissions to operate on it. The player then stands in the plot and executes: /plot group add {group_name}, Towny will add the plot you’re standing in, into a group if it exists, or create a new one if a group with that name doesn’t exist. Simply repeat the command /plot group add {same_group_as_above} while standing in other plots to add those plots to the group.

Most of the other commands used to manipulate plots are the same with one exception, instead of starting with the prefix /plot, plot group operations start with the /plot group prefix. For example to set a property for sale you do /plot fs 10000, but for a plot group named highlands you would do /plot group fs 10000. Perms, types and others follow this convention. See /plot group ? for full command list.

Plot Types

Click here for Major Graft's Video about Plot TypesPlayers can use `/town plots {townname}` to view the counts of various plot types in a town. Towny post-0.75 has added plot types besides the default. This is to give mayors more control over their towns.

Custom Plot Types

A custom plot type consists of 7 elements:

key explanation
name the name used for this townblock, in-game and in the database.
cost Cost a player pays to set a townblock to the type.
tax The amount a player has to pay city each day to continue owning the plot. If tax is set to 0, the towns’ plot tax will be used instead.
mapKey The character that shows on the /towny map commands.
itemUseIds If empty, will use values defined in the protection.item_use_ids. If not empty this defines what items are considered item_use actions when stood in the plot type.
switchIds If empty, will use values defined in the protection.switch_ids. If not empty this defines what blocks are considered switch actions when stood in the plot type.
allowedBlocks A list which will make it so players with build or destroy permissions are only able to affect those blocks, see the farm type for an example. When empty, the normal build/destroy blocks apply.

The plot types that Towny provides are as follows:

Default Plots

These plots do not need any specific command to be designated. They are put up for sale with /plot forsale {$$}. A plot which is not of default type can be reset to a default plot with /plot set reset.

Shop Plots

Shop plots are designated with /plot set shop. A mayor can use /town set shopprice {$$} to set how much shop plots are sold at by default. This can be overridden when a mayor puts the actual plot up for sale with /plot forsale {$$}. A mayor can also charge an additional shoptax with /town set shoptax {$$}. This tax is charged in addition to the normal plottax.

Arena Plots

Arena plots are designated with /plot set arena. PVP is on all the time in arena plots as well as friendly-fire damage. Town health regen is also disabled in arena plots.

Embassy Plots

Embassy plots are designated with /plot set embassy. A mayor can use /town set embassyprice {$$} to set how much embassy plots are sold at by default. This can be overriden when a mayor puts the actual plot up for sale with /plot forsale {$$}. A mayor can also charge an additional embassytax with /town set embassytax {$$}. This tax is charged in addition to the normal plottax. An embassy plot can be bought by any player, whether they are in a town or not, as long as they have the towny.command.plot.claim permission node. The townblock remains owned by the host-town and a mayor from the host-town can take the plot from the owner at any time. Embassy plots can also be changed into shop plots, allowing for larger shop towns, where many different towns’ players can set up shops. When a player leaves a town they do not lose ownership of their plots if those plots are set to be Embassy plots.

Wilds Plots

Wilds plots are designated with /plot set wilds. A wilds plot allows residents to destroy the blocks found on the wild ignore ID list. This includes ores, trees, flowers, mushrooms and other harvestable blocks by default. It does not include stone, dirt, grass and other terrain blocks. It is useful for creating tree farms, and protecting the terrain around a town, while still allowing residents to cut trees and explore caves.

A player can use /towny wildsblocks to see a server’s allowed wilds plots blocks.

Setting up wilds plots can be slightly complex, here are instructions.

  1. Navigate to your towny\data\worlds\WORLDNAME.txt file
  2. Set:
    • unclaimedZoneBuild=false
    • unclaimedZoneDestroy=false
  3. Configure the unclaimedZoneIgnoreIds line to include the blocks you would like players to break/build.
  4. Go to the Wilds plots you can set using /plot set wilds

By default residents will have build/destroy enabled for them, you can also set allies or outsiders perms if you want non-town-members to use the Wilds plots.

Inn Plots

Inn plots are designated with /plot set inn. Inns are most useful when the deny_bed_use setting is true in the config.yml. This setting makes it so that players cannot use beds in plots they do not personally own, except when that plot is an Inn plot.

Inn plot allows anyone to use a bed to set their /res spawn and spawn on death locations. However, Inn plots cannot be used by enemies of your nation.

Jail Plots

Jail plots are designated with /plot set jail.

Players can become jailed if:

  • The player’s mayor/sheriffs send them to jail using one of the following commands:
    • /town jail [name] – Jails the given player for 1 hour, must be a resident of your own town.
    • /town jail [name] {hours} – Jails the given player for the given hours.
    • /town jail [name] {hours} {jail} – Jails the given player for the given hours, in the given jail plot (which is a number.)
    • /town jail [name] {hours} {jail} {cell} – Jails the given player for the given hours, in the given jail plot and jail cell (which are both numbers.)
  • An attacker who attacks a town which considers him an Enemy (Nation-relationship) dies in that Town. He is sent to the defending town’s primaryjail.
  • An attacker who attacks a town which considers him an Outlaw dies in that Town by a player with the towny.outlaw.jailer permission node. He is sent to the defending town’s primaryjail. In the config jail.is_jailing_attacking_outlaws must be true.

Jailed players become unjailed if:

  • they leave their town and become a nomad,
  • the mayor/sheriff unjails them,
  • the player pays a bail amount to the town which jailed them, (using: /resident jail paybail)
  • they manage to escape the jail plot and the town and get into Wilderness.

In addition:

  • Jailed players cannot teleport.
  • Jailed players cannot use Ender Pearls or Chorus Fruit unless enabled in the config.
  • Jailed players who die are sent back to their prescribed jail plot.
  • Jailed players do not give monetary payouts when they are killed.
  • Jailed players show their jailed status in the /res [playername] screen, along with the town they are jailed in.

Also:

  • Optionally in the config: newly-jailed players who log out before they can be teleported to their cell will be killed.
    • The player is warned to prevent surprises.
    • Works similar to many combat-logging plugins.
  • Optional new-player jail immunity
    • Set in the config, how long a new player to the server is protected from being jailed.

Jail plots can have multiple jail cells in them. Jail cells are made using /plot jailcell add and removed using /plot jailcell remove. Jail cells’ spawn locations are marked ingame using a ring of particles.

A town can see a list of their jails using /town jail list. A town sets their primaryjail using /town set primaryjail while standing in a jail plot. Their first jail will automatically become the primaryjail.

Players which are jailed will receive a nice book explaining to them how they can get out of jail, with information pulled from the the server’s config file.

Farm Plots

Click here for Major Graft's Video about Plot Types

Farm plots are designated with /plot set farm. A Farm plot players to only build/destroy blocks designated in the Towny config.yml at global_town_settings.farm_plot_allow_blocks. By default this list includes: BAMBOO,BAMBOO_SAPLING,JUNGLE_LOG,JUNGLE_SAPLING,JUNGLE_LEAVES,OAK_LOG,OAK_SAPLING,OAK_LEAVES,BIRCH_LOG,BIRCH_SAPLING,BIRCH_LEAVES,ACACIA_LOG,ACACIA_SAPLING,ACACIA_LEAVES,DARK_OAK_LOG,DARK_OAK_SAPLING,DARK_OAK_LEAVES,SPRUCE_LOG,SPRUCE_SAPLING,SPRUCE_LEAVES,BEETROOTS,COCOA,CHORUS_PLANT,CHORUS_FLOWER,SWEET_BERRY_BUSH,KELP,SEAGRASS,TALL_SEAGRASS,GRASS,TALL_GRASS,FERN,LARGE_FERN,CARROTS,WHEAT,POTATOES,PUMPKIN,PUMPKIN_STEM,ATTACHED_PUMPKIN_STEM,NETHER_WART,COCOA,VINE,MELON,MELON_STEM,ATTACHED_MELON_STEM,SUGAR_CANE,CACTUS,ALLIUM,AZURE_BLUET,BLUE_ORCHID,CORNFLOWER,DANDELION,LILAC,LILY_OF_THE_VALLEY,ORANGE_TULIP,OXEYE_DAISY,PEONY,PINK_TULIP,POPPY,RED_TULIP,ROSE_BUSH,SUNFLOWER,WHITE_TULIP,WITHER_ROSE,CRIMSON_FUNGUS,CRIMSON_STEM,CRIMSON_HYPHAE,CRIMSON_ROOTS,MUSHROOM_STEM,NETHER_WART_BLOCK,BROWN_MUSHROOM,BROWN_MUSHROOM_BLOCK,RED_MUSHROOM,RED_MUSHROOM_BLOCK,SHROOMLIGHT,WARPED_FUNGUS,WARPED_HYPHAE,WARPED_ROOTS,WARPED_STEM,WARPED_WART_BLOCK,WEEPING_VINES_PLANT,WEEPING_VINES,NETHER_SPROUTS

Players can use /towny allowedblocks to see a list of a server’s farmblocks.

Who can build/destroy these blocks is still determined by the plot’s perm line seen in the /plot perm screen. This means that if B=rnao, anyone can plant/place the allowed blocks in the plot. If the B=r— then only town residents can plant/place the allowed blocks.

If admins want, they can add FARMLAND to the allowed blocks list, which will allow anyone allowed via the perm line to also make farmland with a hoe. By default FARMLAND is not included and only admins/mayors/assistants will be able to create farmland with a hoe. Towny already protects farmland from being stomped into grass, so farmland will only return to dirt if it is not irrigated.

Farm plots also allow player to kill animals in the plot. In order to kill the configured animals list the player must be able to break wheat blocks on the plot. The list of animals is set in the config at global_town_settings.farm_animals. By default this list includes PIG,COW,CHICKEN,SHEEP,MOOSHROOM.

Outposts

Normally townblocks are claimed around the home block, always connected to the town’s other townblocks. To claim a townblock out in the wilderness or in another world, a mayor or assistant must claim an outpost. In order for players to claim outposts, the config must be set to allow_outposts: true and players require towny.town.claim.outpost in their permission node group. The outpost list can be viewed by using /town outpost list command. The spawn point inside of an outpost townblock can be moved using the /t set outpost command.

The residents of the Town can teleport to outposts to using /town outpost x|name|name:x

  • with x being a number 1 – however many outposts the town has
  • where name is the plot name of the outpost (seen in /t outpost list and set using /plot set name {name}.)
  • where name:1asdasda – useful for when a plot name begins with a number.

Buying and Selling Land

Click here for Major Graft's Plot Claiming VideoLand is sold by Mayors to Residents that are a part of their town. `using_economy: true` must be set in [config.yml](https://github.com/TownyAdvanced/Towny/wiki/Default-Config.yml) in order for costs to be applied. Mayors have a command used in game to set the cost of all the plots that are set for sale hence-forth.

  • /town set plotprice {$}
    • This sets the cost of newly-set-for-sale plots, already set-for-sale plots keep their costs.
    • If it is not set, the plots will cost $0 by default.

To put a plot up for sale a mayor, while standing in the plot, type `/plot forsale {optional cost}`. The resident would then type `/plot claim` (while standing in the plot,) to buy it.

Using the Maps

The map in towny displays the grid system of plots. The map can be viewed once using /towny map one time or you can set the map to show every time you move from one block to another:

  • Use /resident toggle map to turn it on or off.

A larger version of the map can be seen using /towny map big.

A hud version of the map can be seen using /towny map hud.

 

How Towny Lets Players Protect Their Blocks

Towny’s genius is the way it lets players protect themselves. An admin doesn’t need to go around protecting land for players, and players can’t run rampant claiming massive amounts of land without working for it and building their towns.

Available in Towny 0.77.0.0 and onward are per-plot permissions. When a plot is claimed by a mayor for their town using /town claim the plot will receive the perm line seen in the /town status screen. When a plot is claimed by a resident from a town using /plot claim the plot will receive the perm line see in the /res status screen. The owner of the plots can set different perms to different plots. To view a plots perm type /plot perm and to set a plots’ perms use /plot set perm.

The first concept you need to digest are the 4 perm-types and 4 groups.

Towny Plot Perms

There are 4 permission-type values, which can be set for personal plots and for town plots as well (town permissions can be set by the mayor and affect plots who are not owned by any player.) The basic command for this is either /resident set perm or /town set perm followed by the proper flags for each permission.

Players can see the server’s switch blocks by using the towny switches command.

Players can see the server’s item_use items by using the towny itemuse command.

Perm-Types

The 4 permission-types available are Build, Destroy, Switch and Itemuse.

  • Build allows players to add blocks in your town/plot.
  • Destroy allows players to remove blocks in your town/plot, or in some cases alter the states of existing blocks (think changing redstone repeater settings.)
  • Switch covers the use of:
    • CHEST,
    • SHULKER_BOXES,
    • TRAPPED_CHEST,
    • FURNACE,
    • BLAST_FURNACE,
    • DISPENSER,
    • HOPPER,
    • DROPPER,
    • JUKEBOX,
    • STONECUTTER,
    • SMITHING_TABLE,
    • FLETCHING_TABLE,
    • SMOKER,
    • LOOM,
    • GRINDSTONE,
    • COMPOSTER,
    • CARTOGRAPHY_TABLE,
    • BELL,
    • BARREL,
    • BREWING_STAND,
    • LEVER,
    • PRESSURE_PLATES,
    • BUTTONS,
    • WOOD_DOORS,
    • FENCE_GATES,
    • TRAPDOORS,
    • MINECARTS,
    • LODESTONE,
    • RESPAWN_ANCHOR,
    • TARGET
    • …. or any other type of block which is clicked on.
  • Itemuse covers the use of:
    • MINECARTS,
    • BOATS,
    • ENDER_PEARL,
    • FIREBALL,
    • CHORUS_FRUIT,
    • LEAD
    • …. or any other type of item which is used in some manner.
  • ItemUse and Switch lists have the follow pre-configured catch-all groups you can add to them: BOATS,MINECARTS,WOOD_DOORS,PRESSURE_PLATES,FENCE_GATES,TRAPDOORS,SHULKER_BOXES,BUTTONS.
  • Note: Vehicles like MINECARTS and BOATS can be added to the switch_ids. If you want to treat other rideable mobs like switches add SADDLE to protect HORSES, DONKEYS, MULES, PIGS, STRIDERS (This is not recommended, unless you want players to not be able to re-mount their animals in towns they cannot switch in.)

Perm-Groups

Click here for Major Graft's Towns & Nations Video

Each permission-type has 4 perm-groups to which the pemissions can be set for.

The four perm-groups are:

  • Friend/Resident
  • Town/Nation
  • Ally
  • Outsider

These are displayed on your /resident perm line as FTAO and stand for Friend, Town, Ally, Outsider. For residents the Friend group consists of a player’s friend list and Town consists of townmembers.

For towns, the perm line reads RNAO, with R representing Residents (players in that town) and Nation representing residents of towns in your nation.

Mayors need to use /t set perm resident blah on/off instead of /t set perm friend blah on/off.

The other groups are:

  • Ally
    • On personally-owned plots allies consist of players in your nation and players in your nation’s allies.
    • On town-owed plots it is players in your nation’s allies.
  • Outsiders
    • Players who are not part of your town or nation or nation’s allies.

All commands are found on the Wiki’s Commands page.

Setting perms in-game with commands

Click here for Major Graft's Plot Permission VideoSetting perms for your town’s public land or your personal plots is easy! There are two distinct levels of protection provided by towns. First are the town blocks, protected because they are part of a town and not owned by anyone. When you enter one of these plots from the wilderness or an owned plot the notification will show “~ Unowned”. Mayors are able to set the permission for unowned plots using the the `/town set perm` command. A full list of commands is on the [commands](https://github.com/TownyAdvanced/Towny/wiki/Towny-Commands) page, here are some examples:

  • /town set perm {on/off} – This turns on or off all permissions for all perm-types and all perm-groups.
  • /town set perm ally {on/off} – This turns on or off all perm-types and for the town’s allies (Nations to which their nation is allied with.)
  • /town set perm resident build {on/off} – This turns on or off all permissions for building done by residents of the town.

Second are the town blocks owned personally by a resident of a town. A resident is able to set the permission for unowned plots using the the /resident set perm command. A full list of commands is on the commands page, here are some examples:

  • /resident set perm {on/off} – This turns on or off all permissions for all perm-types and all perm-groups.
  • /resident set perm friend {on/off} – This turns on or off all permissions for the resident’s friend list.
  • /resident set perm ally {on/off} – This turns on or off all permissions for all perm-types to the resident’s ally list. This consists of the nation’s fellow towns and their nation’s allied nations.
  • /resident set perm outsider switch {on/off} – This turns on or off permissions for switch use by outsiders.

Lastly, don’t forget those are just the defaults for plots, any owned plot can be set with it’s own individual perms:

  • /plot set perm {on/of} – This turns on or off all permissions for all perm-types and all perm-groups on the plot which is being stood in.
  • /plot set perm friend {on/off} – This turns on or off all permissions for the resident’s friend list on the plot which is being stood in.
  • /plot set perm ally {on/off} – This turns on or off all permissions for all perm-types to the resident’s ally list. This consists of the nation’s fellow towns and their nation’s allied nations. This affects the plot which is being stood in.
  • /plot set perm outsider switch {on/off} – This turns on or off permissions for switch use by outsiders on the plot which is being stood in.

Mayors can changed the protection of their town with the following commands:

  • /town toggle explosion
  • /town toggle fire
  • /town toggle pvp
  • /town toggle mobs

Mayors and Residents can change each of their plots individually using these commands:

  • /plot toggle explosion
  • /plot toggle fire
  • /plot toggle pvp
  • /plot toggle mobs

Explosion and fire toggles are overridden by a mayor’s town toggles. The preceding commands by themselves will change the perm line seen from /town or /res. They will also change any plots that were using the previously-set default perm line (town-owned or player-owned plots.) They will not change plots which were not set to the default perm line see in /town or /res. In order to change all plots a mayor or resident must use the following command, which will propagate the current perm line seen in /town or /res to ALL plots owned by the town or resident.

  • /res set perm reset – Propagates the perm line in /res to ALL plots owned by that resident.
  • /town set perm reset – Propagates the perm line in /town to ALL town-owned plots owned by that town.
  • These commands also affect the /town toggle and /plot toggle settings.

Setting trusted lists and plot perm overrides

As of Towny 0.97.1.0 there are Trusted lists for plots and towns, and plot’s can have very fine-grained overrides set up. These features allow players to let other players work in towns and plots while not having to be restricted by the Friend/Resident/Town/Nation/Ally/Outsider plotgroups.

Towns may add a player as a trusted person in their town using /town trust add {name}, and remove them from the trusted list using /town trust remove {name}. Trusted players are treated similar to the mayor in all of the town’s plots, able to do any build/destroy/switch/itemuse action.

A player may add or remove another player as trusted in their plots using /plot trust add|remove {name}. While a player is trusted in a plot, they have the same plot permissions as the plot owner, able to do any build/destroy/switch/itemuse action.

Plot perm overrides lets a player make very specific changes to how specific players are able to use plots. To begin a player is added or removed from a plot’s perm overrides using /plot perm add|remove {name}. After a player is on this list, the plot owner can use /plot perm gui to open a GUI showing an inventory of player heads (the players who’ve been added to the plot perm override with /plot perm add {name}.) When a head is clicked on, a new inventory will display the options for Build/Destroy/Switch/ItemUse and a clickable book which explains how the rest of the system works. Players on the perm overrides list will have specific build/destroy/switch/itemuse permissions in the plot, overriding any other plot perm settings.

Protection Additions Found in Towny Advanced

New in Towny Advanced (0.72+) are three new protection types, anti-explosion and anti-firespread and piston-protection. On the town level, a mayor can set these flags using:

  • /town toggle explosion
  • /town toggle fire

Explosion protection stops all explosions. This stops TNT, TNT cannons and creeper explosions. Firespread protection stops all fires from spreading, including lava, lightning and lighters. Piston-protection allows pistons to operate between similarly owned townblocks or wild areas.

Taxes

Taxes are collected on the town level from residents and on the nation level from towns. Any player can check the taxes which apply to them with the in-game command /res tax. Town mayors can use two commands to set their tax-rates.

  • /town set taxes {$}
    • This can be either a flat rate (ex: 10) or a percentage.
      • Toggling taxes from flatrate to percentage is done using /town toggle taxpercent.
      • Flatrate:
        • This charges each resident of a town the same amount. Setting it to 10 would charge each resident each ‘Towny Day’.
        • If a resident can’t pay his town tax when using flatrate taxation then he is kicked from the town.
        • This has a maximum amount which can be set in the config at economy.daily_taxes.max_town_tax_amount.
      • Percentage:
        • This charges a player a percentage of their money. If a player has no money left, he pays no taxes and is not kicked from the town.
        • A maximum amount taken by the taxpercent can be configured per-town using /town set taxpercentcap {$}.
        • This has a maximum amount which can be set in the config at economy.daily_taxes.max_town_tax_percent.
  • /town set plottax {$}
    • This charges each resident of a town for each plot they own. Setting it to 10 would charge Miner Steve 40 dollars if he owned 4 plots.
    • If a resident can’t pay his plot tax he loses his plot.
    • This has a maximum amount which can be set in the config at economy.daily_taxes.max_plot_tax_amount.

Nation leaders can use one command to set a tax on their towns.

  • /nation set taxes {$}
    • This charges each town that is a member of the nation. Setting it to 100 would charge each town’s townbank 100 each ‘Towny Day’.
    • If a town can’t pay it’s tax then it is kicked from the nation.
    • This has a maximum amount which can be set in the config at economy.daily_taxes.max_nation_tax_amount.

Upkeep

Upkeep collection can be set on towns and on nations separately. Upkeep money is taken from townbanks and nationbanks and removed from the game. You can set the upkeep amounts to negative numbers to pay towns and nations instead of charging them. Upkeep is used by a server admin to remove inactive towns and nations from the server, it will also help reduce inflation in a server economy. Setting the upkeep to a negative number gives the town or nation-banks that amount each new day.

  • price_nation_upkeep: 100.0
    • The server’s daily charge on each nation. If a nation fails to pay this upkeep, all of it’s member towns are kicked and the Nation is removed.
  • price_town_upkeep: 10.0
    • The server’s daily charge on each town. If a town fails to pay this upkeep, all of it’s residents are kicked and the town is removed.

Town and Nation Banks

Towns and Nations both have banks, to which any resident can deposit money but only town mayors and nation leaders (and assistants) can withdraw from. Any money collected via taxes is deposited to the nation/town bank. When a town needs money, to claim a townblock or an outpost, it is taken from the townbank. Since mayors and nation leaders can deposit money to their respective banks, some servers will find that mayors and nation leaders shield their wealth from plugins that take a players money for dying from pvp combat.

  - /town bankhistory {pages}
  - /nation bankhistory {pages}
  - /ta town {townname} bankhistory {pages}
  - /ta nation {nationname} bankhistory {pages}

Town Bankruptcy

As of Towny 0.96.3.0, Towny now can have towns can have their bank go into a negative balance via paying upkeep and/or paying their nation’s tax.

Towns that are bankrupt can use /t deposit {amount} to deposit money into the bank to pay back and remove the bankrupt status.

While bankrupt:

  • Towns cannot invite members.
  • Towns cannot set their town to open status.
  • Towns cannot claim more land.
  • Towns cannot have anything built in their land.

Debt Caps

How far a town can go into debt is up to the admin’s discretion, but by default Towny will use the following formula to determine how much a town’s debt-cap will be:

(Town Cost) + ((TownBlocks - 1)* Townblock Claim Cost) + (Outposts * (Outpost Cost - Townblock Claim Cost))

This roughly amounts to what the Town has had to spend to get to their current claims. The debt cap can be seen in the /town status screen.

 


Town Ruins

Added in Towny 0.96.6.0, the Town Ruins feature enables deleted Towns to enter into a pseudo-deleted state.  Simply put: when a town would be deleted, be it from not paying the upkeep, or someone using the delete command, the town becomes Ruined.

While ruined a town is subject to the following:

  • The townblocks cannot be claimed by other towns (they are still claimed by the town,)
  • The town will be placed under the control of an NPC mayor,
  • The town can be griefed,
  • The town’s residents will not be able to execute most /town commands and no /plot commands,
    • /town, /town reclaim|list|leave are allowed.