ℹ️ This feature is available in HuskTowns v1.8+ only.
You can customize the roles members of a town may hold as well as the privileges within the town each role has. Towns require at least two roles with different weights; a "mayor" role and a default citizen role, otherwise you will encounter errors.
- If you change the number of roles, you will need to reset your data - as the role weightings stored in the database will become incompatible.
- You can change the privileges at any time in the config, though
- You can also change the role name as you see fit. It's the weightings which cannot change as those are stored in the database.
Roles are defined in the config as follows, which is a copy of the default setup.
town_roles: MAYOR: weight: 3 display_name: 'Mayor' town_privileges: - plot_unclaim_other - bio - evict - promote - demote - flag - rename TRUSTED: weight: 2 display_name: 'Trustee' town_privileges: - farm - plot - plot_assign - trusted_access - unclaim - claim - greeting - farewell - invite - setspawn - publicspawn CITIZEN: weight: 1 display_name: 'Citizen' town_privileges: - deposit - chat - spawn
Each role must have:
- An identifier (CITIZEN)
- A weight (1)
- A display name ('Citizen')
- A list (can be empty) of role privileges (detailed below) that this role has.
- The role weight identifies the rank of the role in the town.
- Roles with higher weightings are more important - the role with the highest weighting is the mayor and the role with the lowest weighting is the default role for newly joined citizens.
- Roles inherit privileges from all roles with a lower weighting, so there's no need to duplicate them.
- Role weightings must be unique.
Role privileges are how you specify what rights each role has in your town. The below table is a list of all these privileges and what rights they give each role. If you don't assign a privilege to a role, nobody will be able to perform that action, so make sure they are all assigned.
|Ability to change the town bio|
|Ability to kick town members (cannot evict members with an equal or higher rank thank you)|
|Ability to promote town members (cannot promote players to your rank or to a rank higher than you)|
|Ability to demote town members (cannot demote players with an equal or higher rank than you)|
|Ability to modify town flags|
|Ability to rename the town|
|Ability to convert claimed chunks into farms and vice versa|
|Ability to convert claimed chunks into plots and vice versa (the plot_unclaim_other is required to convert claimed plots back, though)|
|Ability to assign town members to a plot|
|Ability to unclaim a plot assigned to someone|
|Ability to build outside your assigned plot chunk(s), including in regular claimed chunks.|
|Ability to claim chunks for your town|
|Ability to unclaim chunks from your town|
|Ability to change the town greeting message|
|Ability to change the town farewell message|
|Ability to invite new members to your town|
|Ability to teleport to your town's spawn|
|Ability to update the town spawn|
|Ability to toggle the privacy of your town's spawn|
|Ability to deposit money into your town coffers|
|Ability to use the town chat|
Some actions are automatically given to only the mayor - such as the ability to disband and transfer ownership of a town. Only one player can be the mayor. If you'd like a "co-mayor" setup, it's recommended that you define two roles - one "true" "mayor" with the highest weighting, and a "co-mayor" weighting just below that, and assign that role all the privileges. Higher roles inherit privileges from lower-weighted role, remember.