Installation - TownyAdvanced/Towny GitHub Wiki

Installing Towny is easy. There are usually just two things that admins miss.

  • Configuring the existing worlds.
  • Townyperms.yml already has 99% of the Towny permission nodes given out correctly.

Read the steps here carefully and you'll save yourself a lot of head-scratching and trouble.

Server Preparation

  1. Stop your server completely.
  2. Download either of the following:
    • Latest release build from the Releases tab.
      • The .zip file will include a Towny.jar and TownyChat.jar, which must be unzipped/extracted.
    • Latest pre-release/development build from the Releases tab.
      • Includes Towny.jar.
      • TownyChat's latest files can be gotten from the TownyChat repository's Releases page.
      • The documentation on the wiki does not get updated until a Release build is out. You will need to read the changelog to learn what's been added/removed/fixed since the last Release.
    • You can consult the Readme to see which version you should use for older Minecrafts.
  3. Place your .jar files your Plugins folder.
    • Towny.jar is required at all times
    • TownyChat.jar is required if you want Towny to modify chatting:
      • Adding prefixes and suffixes from your permissions plugin to chat
      • Adding town, nation-related tags to chat.
      • Adding general/local/town/nation/mod/admin to chat channels.
    • Either Vault.jar or Reserve.jar (separate downloads) is required if you use an economy plugin.
  4. Start your server, allowing Towny and TownyChat to generate the configuration files in the plugins\towny\settings\ folder, and the world configuration files in the plugins\towny\data\worlds\ folder.
  5. Stop your server, so that you can edit your Towny configuration files.
  6. Continue reading below, do not skip the Configuring Existing Worlds section of this guide.

In-game installation command:

As of Towny 0.97.2.0 you can take advantage of the /ta install command, which can be run when your server is turned on.

In order to use this command you will either have to be OP, or have either permission nodes: towny.admin or towny.command.townyadmin.install.

Using the command will prompt the admin who ran it to answer how they want the following settings configured. If you use this command you will not have to run the individual commands found later in this install guide.

  • Whether the wilderness should be usable.
  • Whether the revert-on-unclaim feature should be active.
  • How many townblocks/plots a town should get per-resident.
  • How much a new town will cost.
  • How much a new nation will cost.
  • How much claiming a townblock will cost.

Configuring Existing Worlds

If you took advantage of the /ta install command you have already set your server's revert-on-unclaim and wilderness-use settings. This section is still important to review.

Towny's config.yml has a config section called Default New World Settings. When you started the server it took the default Default Settings and applied it to all your existing worlds. This includes the revert-on-unclaim feature and explosion-revert settings for each world.

By default player cannot build/break in the wilderness, if you want to enable this use /ta toggle wildernessuse

By default Towny will regenerate explosions in the wilderness, and when towns unclaim land their blocks will disappear and return to their pre-claim appearance. If you want to disable this use /ta toggle regenerations.

Configuring config.yml

  1. Navigate to \plugins\towny\settings\.
  2. Open the config.yml.
  3. Carefully edit the config.yml to your liking, including:
    • town_block_size: 16 which sets your server's Townblock size (defaults to 16x16) and cannot be changed later.
    • Settings for new towns and nations.
  4. Change the economy settings:
    • If you do not use an economy plugin, set using_economy: false.
    • If you are using a UUID version of EssentialsEco, add NPC: to the beginning of Town- and Nation- in Economy Settings section:
      • From this:
        town_prefix: town-
        nation_prefix: nation-
        
      • To this:
        town_prefix: NPC:town-
        nation_prefix: NPC:nation-
        
  5. Save the config.yml.
  6. Start your server. You are now ready to begin your own town.

Configuring townyperms.yml (semi-optional)

Towny has a built-in permission system, in order to make giving out Towny permission nodes incredibly simple for you, which is configured using the townyperms.yml file. Some admins make the mistake of placing Towny permission nodes into their permission plugin. The only permission nodes you must give in your permission plugin is towny.admin to your admin group(s).

The only other permission node which isn't already given out is towny.wild.*. Giving this node will grant full build/destroy/switch/itemuse rights to players in the wilderness. You must decide if you want to give this out, and how. This is not required if you've use the /ta toggle wildernessuse command or if you had previously run the /ta install command.

If you did not use the /ta toggle wildernessuse or /ta install commands you have two options:

  • a) put towny.wild.* in the nomad section of the townyperms.yml file, which will enable all players server-wide to use the wilderness.
  • b) give towny.wild.* in your permission plugin, to whichever rank you want to use the wilderness.

If you still feel the need to alter the pre-configured townyperms.yml file, follow the instructions below:

  1. Navigate to \plugins\towny\settings\.
  2. Open the townyperms.yml.
  3. Carefully read the comments section at the beginning of the file, then read over the default groups/ranks.
  4. Add and remove permission nodes as you see fit.
  5. Optionally, add your own ranks for mayors to promote (or demote) their residents to.
  6. Save your townyperms.yml.
  7. Perform /ta reload perms in-game to see your changes.

Configuring channels.yml (optional)

This step is optional if you have TownyChat.jar.

  1. Navigate to \plugins\towny\settings\.
  2. Open the channels.yml, reading the comments at the beginning of the file.
  3. Edit the channels.yml to your liking.
  4. Save the channels.yml.
  5. Perform /townychat reload in-game to see your changes.

Configuring chatconfig.yml (optional)

This step is optional if you have TownyChat.jar.

  1. Navigate to \plugins\towny\settings\.
  2. Open the chatconfig.yml, reading the comments at the beginning of the file.
  3. Edit the chatconfig.yml to your liking.
  4. Save the chatconfig.yml.
  5. Perform /townychat reload in-game to see your changes.