Плагины Инструкция по плагину Towny

dfq

Игрок
Предисловие
Недавно на форуме была создана ветка с предложениями по улучшению сервера. Мною был предложен плагин Towny и это предложение было предварительно одобрено администрацией (ссылка). В связи с этим, был создан данный тред.
К сожалению, не удалось найти полноценного перевода официальной инструкции на русском языке. Это только заготовка для статьи, она будет дополняться по мере перевода официальной инструкции плагина с английского языка. В данной инструкции будут опущены моменты, касающиеся настройки плагина администраторами серверов.
Да, перевод - довольно утомительная задача, так что если вы хорошо знаете английский язык и желаете помочь, сообщите мне об этом в ЛС. Буду рад любой помощи! Так же вы можете сильно помочь тем, что найдёте или составите удобную инфографику на русском языке. Так как переход, скорее всего, состоится в марте-апреле, перевод будет делаться в неспешном режиме.


О плагине

Towny - плагин для Bukkit/Sponge, предоставляющий систему защиты территории с разграничением прав. Игроки могут создавать города, которые впоследствии могут быть объединены в нации.

Система защиты территории оперирует блоками размеров 16х16 (может быть изменён в настройках) и высотой от нижней до верхней границ мира. Кварталы расположены строго по сетке. Каждый город содержит кварталы максимальное число которых определяется числом жителей города. Граждане могут арендовать или покупать кварталы, а также платить налоги установленные мэром города. Города могут объединиться в нации, а мэр столицы объявляется королём нации и получает право устанавливать налоги и управлять казной нации.

Война - специальный режим, который может быть включен или выключен администраторами. В войне участвуют нации, нейтральные города не участвуют в ней и их территории не могут быть захвачены или разрушены.



Иерархия

Отшельник
Отшельники это категория игроков, которые не могут владеть какими-либо землями. В зависимости от выданных администратором прав, они могут владеть только кварталом-посольством.
Гражданин
Каждый игрок, присоединившийся к серверу, становится гражданином. Он может присоединиться к существующему городу, купив выставленный на продажу участок, или основать свой. Гражданин, одновременно, может являться жителем не более чем одного города. Команда '/resident' выводит основную информацию о гражданине.
Город
Город является группой граждан (которая может состоять из единственного гражданина), среди которых один является мэром. Город имеет банк, к которому имеет доступ мэр и его помощники. Граждане могут быть обязаны платить ежедневный налог за каждый квартал, которым они владеют.

В каждом городе имеется главный блок, блок в котором мэр стоял во время создания города. Присоединяемые к городу блоки должны лежать по соседству с существующими кварталами, блок не соседствующий с городом можно присоединить как аванпост.
Мэр
Мэр и его помощники управляют городом и рангами его граждан. Доступные ранги определяются администрацией и их список можно узнать с помощью команды '/town ranklist'. Управление рангами происходит с помощью команды '/town rank {add|remove} {playername} {rankname}'. У игрока может быть более одного ранга, что позволяет мэру более гибко распределять себе помощников. Игрок может являться мэром не более чем в одном городе.
Нация
Нация это группа городов (которая может состоять из единственного города), среди которых один является столицей. Королём нации является мэр столицы этой нации. Нации могут участвовать в войнах, заключать союзы и имеют банк. В нации могут быть введены ежедневные налоги на содержащиеся в ней города.
Король
Мэр и его помощники управляют нацией и рангами её граждан. Доступные ранги определяются администрацией и их список можно узнать с помощью команды '/nation ranklist'. Управление рангами происходит с помощью команды '/nation rank {add|remove} {playername} {rankname}'. У игрока может быть более одного ранга, что позволяет королю более гибко распределять себе помощников.

Короли имеют возможность установить титул (префикс) и фамилию (суффикс) каждому гражданину нации. Это делается командами:
  • /nation set title {name} {титул}
  • /nation set surname {name} {фамилия}


Города

Создание города
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.
Город можно основать с помощью команды '/town new {название города}'. Блок на котором при этом стоял мэр, объявляется главным блоком, а точная позиция станет точкой городского спауна. Добавление блоков происходит с помощью команды '/town claim', новые блоки должны лежать по соседству с существующими кварталами города.
Объединение городов
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.
Кварталы
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.

Размер квартала
You change the townblock size in config.yml at town_block_size: 16. Changing this value is suggested only when you first install Towny. Doing so after entering data will shift things unwantedly. Using smaller value will allow higher precision, at the cost of more work setting up. Also, extremely small values will render the caching done useless. Each cell is (town_block_size x town_block_size x 128) in size, with 128 being from bedrock to clouds.
Размер города
You can change how many town blocks a town gets to claim. This is done in two places.

Towny checks first in the config.yml at town_block_ratio: 8 and by default gives a town 8 townblocks per resident.
You can override this by setting town_block_ratio: 0 and using the townLevel section of the config.yml
More information on the townLevel line and how to configure it is here.
Покупка кварталов
Mayors can buy townblocks using /town buy bonus {amount}. An admin can set a maximum limit on how many townblocks a town can buy in the config.yml at max_purchased_blocks: '0'. The price of a bought townblock is also set in the config.yml atprice_purchased_bonus_townblock: '25.0'. Using this feature, mayors can grow their town without needing new residents.
Типы участков
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:

Стандартный участок
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 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 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 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 are designated with /plot set wildsA 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.

Setting up wilds plots can be slightly complex, here are instructions.
  1. Navigate to your towny\data\worlds\WORLDNAME.txt file
  2. Set:
  3. unclaimedZoneBuild=false
  4. unclaimedZoneDestroy=false
  5. Configure the unclaimedZoneIgnoreIds line to include the blocks you would like players to break/build.
  6. Go to the Wilds plots you can set using /plot set wilds
  7. Use '/plot set perm resident build on' and '/plot set perm resident destroy on' to enable residents to break/build using only the blocks in the ignoreIDs list.
You can also set allies or outsiders perms if you want non-town-members to use the Wilds plots
Гостиница
Inn plots are designated with /plot set innAn 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
Аванпосты
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.

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.

An admin can configure how many outposts a player can claim, this is set in your permissions plugin's info/option/meta node section using the towny_maxoutposts: {number} info node. See here.

Outposts cannot be claimed too close to other home blocks, just like when a mayor starts a town they cannot be too close. The exact number is set in the config.yml at min_distance_from_town_homeblock: 5. In the default setting an outpost cannot be claimed within 5 townblocks of any other homeblock.

Outposts have two settings in config.yml
  • By setting allow_outposts: false you can disable outposts completely.
  • You can also set the cost of claiming an outpost with price_outpost: 500.0
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.)
Продажа земли
Land is sold by Mayors to Residents that are a part of their town. using_iconomy: true must be set in 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.
Карта
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.
Регенерация и освобождённые участки
There are 4 options for affecting townblocks/plots.

Возвращение освобождённых участков к исходному виду
When a town plot is unclaimed (by a player or through upkeep) it will slowly begin to revert to a pre town state. Blocks will slowly change back to whatever blocks we're present at the moment the town block was claimed. A townblock must revert completely before the snapshot of the townblock is removed. If townblock is reclaimed mid-revert, a new snapshot is not taken and if the townblock is unclaimed again it will revert to the original snapshot.
  • Disabling this feature is done in the towny\data\worlds\worldname.txt @ usingPlotManagementRevert=false
  • or by using '/tw toggle revertunclaim' while standing in the world you want to toggle it in.
  • Disabling this feature for new worlds is done in the config at new_world_settings.plot_management.revert_on_unclaim.enabled
You can configure certain block types you don't want restored to prevent players exploiting regen for diamond ores.
  • Block types to not restore are configured in block_ignore in the worlds txt file data/worlds/worldname.txt
  • Defaults for new worlds are set in the config at new_world_settings.plot_management.revert_on_unclaim.block_ignore:
Удаление определённых блоков при освобождении
When a town plot is unclaimed (by a player or through upkeep) block IDs matching a list will be deleted within that townblock. This can be useful for deleting all signs within a townblock, ensuring any chests locked with Lockette or Deadbolt signs are unlocked.
  • Disabling this feature is done in the towny\data\worlds\worldname.txt @ usingPlotManagementdelete=false
  • Disabling this feature for new worlds is done in the config at new_world_settings.plot_management.block_delete.enabled
You can configure the list of blockIDs to be removed on a per-world basis.
  • The blockIDs listed in the towny\data\worlds\worldname.txt @ plotManagementDeleteIds= will be removed from the townblock.
  • Defaults for new worlds are set in the config at new_world_settings.plot_management.block_delete.unclaim_delete
Команда "/plot clear"
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.
  • Disabling this feature is done in the in the towny\data\worlds\worldname.txt @ usingPlotManagementMayorDelete=false
  • Disabling this feature for new worlds is done in the config at new_world_settings.plot_management.mayor_plotblock_delete.enabled
You configure the list of blockIDs to be removed when this command is used.
  • The list of blockIDs is listed in the towny\data\worlds\worldname.txt @ plotManagementMayorDelete=WALL_SIGN,SIGN_POST
  • Defaults for new worlds are set in the config.yml at new_world_settings.plot_management.mayor_plotblock_delete.mayor_plot_delete
As of Towny 0.79.1.0, players can use this command within plots they personally own.
Регенерация незанятых земель
A simple wild_revert_on_mob_explosion option. Will regenerate explosions on a timer. As of Towny 0.79.1.0 You can now add any entities here you want explosions to revent for in the wilderness (includes Creeper,EnderCrystal,EnderDragon,Fireball,SmallFireball,TNTPrimed). These settings are copied to the individual world files, so you must make changes per world.
  • Disabling this feature is done in the in the towny\data\worlds\worldname.txt @ usingPlotManagementWildRegen=true
  • or by using '/tw toggle revertexpl' while standing in the world you want to toggle it in.
  • Disabling this feature for new worlds is done in the config at new_world_settings.plot_management.wild_revert_on_mob_explosion.enabled
You can configure how quickly the blocks will regenerate, specifically how much time in between each block being reverted.
  • The timer is changed in the towny\data\worlds\worldname.txt @ usingPlotManagementWildRegenDelay=5
  • The default for new worlds is set in the config.yml at new_world_settings.plot_management.wild_revert_on_mob_explosion.delay


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.

Available in Towny 0.77.0.0 and onward are per-plot permissions. Plots start with the default settings for plot perms (be it a resident-owned or town-owned plot,) but 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.

Default permissions are viewable by typing either /resident for personal plot perms or by typing /town for town permissions.


Perm-Types
The 4 permission-types available are Build, Destroy, Switch and Itemuse.
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.
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.
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. Friendly fire can be disabled in the config.yml friendly_fire: 'true' by setting it to false. The friendly-fire settings affects all worlds in which towny is enabled.
Plot, Town and World PVP Settings
Plots, Towns and Worlds all have PVP settings, here is how they work.

World PVP Settings
World settings for PVP are controlled using in-game commands
  • /townyworld toggle pvp
    • This command disables and enables PVP world-wide. If you type /tw you will see will see a red {PVP} next to the name of the world at the top of the output. If PVP is off in the world, no pvp combat can occur, even in Arena plots.
  • /townyworld toggle forcepvp
    • This command forces pvp on world-wide, disregarding any plot or town pvp settings. Friendly-fire is still obeyed.
    • There is a way to override forcing pvp on in towns. Navigate to the Towny\Data\Towns\ folder and open the townname.txt file. Find the adminDisabledPvP flag and set it to adminDisabledPvP=true This is useful for forcing pvp on worldwide but leaving it off in a spawn-town.
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.
 
Последнее редактирование:
Отлично,я себя могу сделать Ярлом/Мером. Как раз 11 юнитов живет....
 
Сверху