You are here:
< Back

This is an over view of how our Town protection system works, for commands visit this page http://www.byte.org.uk/mc/wiki/byte/rpg/plugins/towny-advanced/

The Hierarchy

Nomads

Nomads are simply players who are not part of any town. They are landless but Nomads can purchase Embassy plots.

Residents

Every person who joins your server can become a resident (the 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 Screen, displaying Money, Town, Plots owned and Friends.

Residents can join towns or choose to start a town of their own.

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 perm line showing the plot perms given on all plots that resident owns..

Towns

A 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.

Mayors

Mayors run towns and with the help of their assistants, manage a town and its residents.

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.

 

Nations

A nation is a collection of towns (or just one town) with one town as the capital. The mayor of that capital is the king. 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.

Kings

Kings lead Nations and are the mayor of the capital city.

Kings 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. Kings 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 king to choose for their trusted residents.

Kings 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}. 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.

More townblocks can be claimed using /town claim. These townblocks need to be directly adjacent to already claimed townblocks.

Joining Towns

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

Mayors and assistants can add players to their town with the command /town add {playername}. If the server has Questioner.jar and using_questioner: true in the Towny config.yml then 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.

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 16x16x128 (the full height of the world.) Townblocks are claimed by town mayors who can then sell/give individual plots to their town’s residents.

Buying Townblocks

Mayors can buy townblocks using /town buy bonus {amount}.
Using this feature, mayors can grow their town without needing new residents.

Plot Types

Towny post-0.75 has added plot types besides the default. This is to give mayors more control over their towns.

As of now there are:

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 overriden 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. 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.

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
An Inn plot allows anyone to use a bed to set their ‘/res spawn’ and spawn on death. The Inn plot will still deny a player who is in a nation declared as an enemy by your nation.
For them to function deny_bed_use: ‘true’ must be set in the config.yml

Jail Plots

Jail plots are designated with /plot set jail

  • Players can become jailed if:
    • The player’s mayor/sheriffs send them to jail.
    • An attacker who attacks a town which considers him an Enemy (Nation-relationship) dies in that Town. He is sent to the first available Jail plot of the defending town.
  • 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.
  • Jailed players cannot teleport.
  • Jailed players cannot use Ender Pearls 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.
  • It is suggested you make a new town rank in the townyperms.yml called Sheriff, and give that rank the towny.command.town.toggle.jail node. Newly generated townyperms.yml files will contain this rank by default.

Outposts

Normally townblocks are claimed around the home block, always connected to the town. To claim a townblock out in the wilderness, a mayor or assistant must claim an outpost.

Outposts cannot be claimed too close to other home blocks, just like when a mayor starts a town they cannot be too close.

 

Outposts can be teleported to, mayors set the spawn point of the outpost when they claim it or using ‘/town set outpost’. Players teleport to the outpost using ‘/town outpost x’ (with x being a number 1 – however many outposts the town has.)

Selling Land

Land is sold by Mayors to Residents that are a part of their town.

  • /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 set mode map to turn it on.
  • And use /resident set mode reset to turn it off.

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

Plot-Owners’ and Mayors’ /plot clear command

A feature available only to Town Mayors on public town land: /plot clear. This command is meant to be used after a plot was personally owned by a resident, who either moved to another plot or left town. By default this list includes only signs, useful for mayors to remove sign-protection on doors, chests, furnaces, dispensers and trapdoors given via Lockette or Deadbolt.


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.

The first concept you need to digest are the 4 perm-types and 3 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.

 

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.
  • Switch covers the use of:
    • dispensers,
    • noteblocks,
    • chests,
    • furnaces,
    • wooden and iron doors,
    • levers,
    • gold, iron, stone and wood pressure plates,
    • stone buttons,
    • trapdoors,
    • jukeboxes,
    • redstone repeaters,
    • gates,
    • trapped chests,
    • redstone comparators,
    • beacon blocks,
    • hoppers,
    • droppers,
    • item frames,
    • Accessing minecart hoppers, minecart chests, minecart furnaces.
  • Itemuse covers the use of:
    • water and lava buckets,
    • empty buckets,
    • lighters,
    • bonemeal and other dyes,
    • enderpearls,
    • placing/destroying all minecart types,
    • firecharges,
    • using bottles.

Perm-Groups

Each permission-type has 3 perm-groups to which the pemissions can be set for, these are displayed on your /resident perm line as FAO and stand for Friend, Ally, Outsider.
For residents the Friend group consists of a player’s friend list.
For towns the perm line reads RAO, with R representing Residents (players in that town) and 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
    • Players from your town,
    • other towns in your nation,
    • and nations your nation is allied with.
  • Outsiders
    • Players who are not part of your town or nation or nation’s allies.

 

Setting perms in-game with commands

Setting 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.

  • /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 (Towns in their nation, 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.

  • /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 resident’s fellow townmembers, their 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/off} – 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 resident’s fellow townmembers, their 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

Per-plot 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.

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.


How Towny Controls PVP Combat

Towny affects PVP combat, deciding who can be damaged where and by whom.

Friendly-fire

By default Towny disables friendly-fire between townmembers, nationmembers and residents whose nation considers the attacker’s nations an ally.

Plot & Town PVP Settings

Plots, Towns and Worlds all have PVP settings, here is how they work.

Town PVP Settings

Towns pvp settings are controlled using this in-game command

  • /town toggle pvp
    • This toggles pvp on and off town-wide.

Plot PVP Settings

Plots can have their pvp status controlled individually with this in-game command

  • /plot toggle pvp
    • This toggles a single plot’s pvp status.


 

Kings’ minions’ prefixes and suffixes

Kings of nations can use two commands to change the displayed chat names of their minions:

  • /nation set title {resident} {text of prefix}
    • Adds a prefix to the player.
  • /nation set surname {resident} {text of suffix}
    • Adds a suffix to the player.
  • A title/surname given to a mayor will override the MayorPrefix/MayorPostfix set in the townLevels of the config. He will still retain the colouring set on mayor names (default is light blue.)