Skip to content

Commands

Sergiu Muresan edited this page Aug 25, 2015 · 32 revisions

Commands

  1. Regular player commands
  1. Admin commands
  1. Console-only commands

Each /town can be substituted with /t or /mytown

Each /townadmin can be substituted with /ta or /mytownadmin

Each parameter in a command that is surrounded by <> is necessary.

Each parameter in a command that is surrounded by [] is optional.

Each parameter in a command that contains a | in between 2 text strings means it can have one of the 2 values.

Syntax, permission or formatting errors (such as the number not being a positive integer) are not included.

Town creation and management

`/town new <name>` with perm `mytown.cmd.outsider.new`

Creates a new town with the `name` given.
It will give an error if:
 * Name is already in use.
 * Player has reached the maximum amount of towns it can be a resident of.
 * Chunk is already claimed by another town.
 * There is a town in a radius (Default: 5 chunks) with the `nearby` flags set to `false`

`/town claim [range]` with perm `mytown.cmd.assistant.claim`

Claims the chunk you are currently in and all the chunks around you in the given radius.
If the chunks are not adjacent to the main claim then it will be considered `one` far claim.
It will give an error if:
 * One of the chunks is already claimed.
 * There is a town in a radius (Default: 5 chunks) around one of the chunks with the `nearby` 	flags set to `false`
 * It is a far claim but the town reached the limit of far claims.

`/town unclaim` with perm `mytown.cmd.assistant.unclaim`

Removes the claim of the chunk you are in.
It will give an error if:
 * Chunk is not already claimed.
 * Chunk contains the spawn point.
 * Chunk is the last claim in a town.

Town commands for 'assistant' residents

`/town kick <resident>` with perm `mytown.cmd.assistant.kick`

Removes a given `resident` from the town.
It will give an error if:
 * `resident` is not in town.
 * `resident` is the mayor.
 * `resident` is you.

`/town rename <name>` with perm `mytown.cmd.assistant.rename`

Renames the town with the given `name`.
It will give an error if:
 * `name` given is already in use.

`/town setspawn` with perm `mytown.cmd.assistant.setspawn`

Sets the spawn of the town to your current location.
It will give an error if:
 * You are not inside the town.

`/town invite <resident>` with perm `mytown.cmd.assistant.invite`

Invites the `resident` to your town.
It will give an error if:
 * `resident` is already in town.

`/town perm set <flag> <value>` with perm `mytown.cmd.assistant.perm.set`

Sets a flag to the specified value.
It will give an error if:
 * `flag` or `value` are invalid.

`/town perm whitelist` with perm `mytown.cmd.assistant.perm.whitelist`

Gives the player a whitelister tool to allow certain blocks to be bypassed by protection check. (Currently WIP)

`/town promote <resident> <rank>` with perm `mytown.cmd.assistant.promote`

Promotes the `resident` to the given `rank`.
It will give an error if:
 * `resident` or `rank` is invalid.
 * `rank` is of Mayor type.

`/town leave delete` with perm `mytown.cmd.mayor.leave.delete`

Deletes the town.
It will give an error if:
 * You are not the Mayor

`/town bank withdraw <amount>` with perm `mytown.cmd.assistant.bank.withdraw`

Withdraws a certain `amount` from the town's bank.

Town commands for regular residents

`/town leave` with perm `mytown.cmd.everyone.leave`

Removes you from the town.
It will give an error if:
 * You are the mayor. In which case you might want to either pass mayorship `/town pass 	<resident>` or delete the town `/town leave delete`.

`/town spawn` with perm `mytown.cmd.everyone.spawn`

Returns you to spawn.
It will give an error if:
 * You do not have enough money to do this action.

`/town select <town>` with perm `mytown.cmd.everyone.select`

Selects one of the town you are resident of.
It will give an error if:
 * You are not part of the given `town`

`/town blocks list` with perm `mytown.cmd.everyone.blocks.list`

Lists all the blocks(chunks) claimed by the town.

`/town perm list` with perm `mytown.cmd.everyone.perm.list`

Lists all the flags, their values and descriptions.

`/town borders <command>` with perm `mytown.cmd.everyone.borders`

`/town borders show` with perm `mytown.cmd.everyone.borders.show`

Shows the borders of the town by visually replacing some of the blocks with lapis blocks.

`/town borders hide` with perm `mytown.cmd.everyone.borders.hide`

Hides the borders of the town.

`/town bank deposit <amount>` with perm `mytown.cmd.everyone.bank.deposit`

Transfers a certain `amount` from the player's balance to the town's bank.
It will give an error if:
 * The player doesn't have the `amount` in its inventory.

`/town bank info` with perm `mytown.cmd.everyone.bank.info`

Shows info about the town's bank.

`/town wild <command>` with perm `mytown.cmd.everyone.wild`

`/town wild perm` with perm `mytown.cmd.everyone.wild.perm`

Shows the flags, their values and description of the Wilderness (the unclaimed chunks on the server)

Town commands for anyone

`/town info [town]` with perm `mytown.cmd.outsider.info`

Shows information about the town.
If you are a member of a town `/town info` will show info about your town.

`/town res <resident>` with perm `mytown.cmd.outsider.res`

Shows information about a certain `resident`

`/town list` with perm `mytown.cmd.outsider.list`

Lists all the towns.

`/town map` with perm `mytown.cmd.outsider.map`

Shows the map (as ASCII characters in chat) of the chunks that are claimed around the player.

`/town invites` with perm `mytown.cmd.outsider.invites`

Shows a list of all the town's you have an invite from.

`/town accept [town]` with perm `mytown.cmd.outsider.accept`

Accepts an invitation. `town` is required when you have more than one invitations.

`/town refuse [town]` with perm `mytown.cmd.outsider.refuse`

Refuses an invitation. `town` is required when you have more than one invitations.

`/town invites` with perm `mytown.cmd.outsider.invites`

Shows a list of the towns from which you have invites.

`/town prices` with perm `mytown.cmd.outsider.prices`

Shows a list of prices for all the things in MyTown2:
 * Town creation 
 * Town claim
 * Additional claim (the price that is added to the town claim for every claim you already have)
 * Far claim
 * Teleport to spawn
 * Setting the spawn of the town
 * Teleporting to other town's spawn
 * Town upkeep (price you have to pay each real time day)
 * Claim upkeep (price you have to pay each real time day per town claim)

Plot management

Most commands here will give an error if:
 * You are not inside the plot
 * You do not have owner rights to the plot you are standing in.

`/town plot perm set <flag> <value>` with perm `mytown.cmd.everyone.plot.perm.set`

Sets a flag in the plot you are standing on.

`/town plot perm list` with perm `mytown.cmd.everyone.plot.perm.list`

Lists all the flags with their respective values.

`/town plot perm whitelist` with perm `mytown.cmd.everyone.plot.perm.whitelist`

Gives the whitelister tool to the player. (Currently WIP)
With the tool you can whitelist a block so that the block will bypass the protection for certain flags. 
(Ex: whitelisting a furnace for the flag `access` will let anyone use the furnace)

`/town plot rename <name>` with perm `mytown.cmd.everyone.plot.rename`

Renames the plot you are standing in.
It will give an error if:
 * The new name is already taken by another plot in the same town.

`/town plot new <name>` with perm `mytown.cmd.everyone.plot.new`

Gives the player a plot selection tool. It will allow the player to select two corners of the wanted plot.
It will give an error if:
 * Plot is too small/large.
 * You have reached the limit of how many plots you can own.
 * Selection is outside the boundaries of the selected town.

`/town plot select reset` with perm `mytown.cmd.everyone.plot.select.reset`

Resets the selected area of the plot selection tool. 
It will give  an error if:
 * You have not selected anything yet.

`/town plot show` with perm `mytown.cmd.everyone.plot.show`

Visually shows all the plots inside of the selected town.

`/town plot hide` with perm `mytown.cmd.everyone.plot.hide`

Visually hides all the plots inside of the selected town.

`/town plot add owner <resident>` with perm `mytown.cmd.everyone.plot.add.owner`

Adds a resident to the owner list of the plot you are standing in.
Owners have full access to everything inside the plot.
It will give an error if:
 * The resident is not in the same town.

`/town plot add member <resident>` with perm `mytown.cmd.everyone.plot.add.member`

Adds a resident to the member list of the plot you are standing in.
Members can bypass any protection inside the plot but no modify the settings or add anyone else.
Members do NOT have to be in the same town.

`/town plot remove <resident>` with perm `mytown.cmd.everyone.plot.remove`

Removes a memeber/owner from the plot.
It will give an error if:
 * The resident is not a member/owner of the plot.

`/town plot info` with perm `mytown.cmd.everyone.plot.info`

Shows information about the plot you are standing in.

`/town plot delete` with perm `mytown.cmd.everyone.plot.delete`

Deletes the plot you are standing in.

`/town plot sell <price>` with perm `mytown.cmd.everyone.plot.sell`

Gives the player a plot sell tool. Right click on any of the owned plots and it will place a sign that when right clicked by another member of the town it will:
 * Add him as an owner.
 * Remove you and anyone else from the plot.
 * Give you the money specified on the sign.

`/town plot limit show` with perm `mytown.cmd.assistant.plot.limit.show`

Shows the limit of how many plots a resident can be owner of inside the town.

`/town plot limit set <limit>` with perm `mytown.cmd.assistant.plot.limit.set`

Sets the limit of how many plots a resident can be owner of inside the town.

Rank management

Some of the commands in this category may not be available due to some config changes. Make sure you enable modifiableRanks inside the MyTown2 config.

`/town ranks list` with perm `mytown.cmd.everyone.ranks.list`

Lists all the ranks currently in the town.

`/town ranks add <name> [templateRank]` with perm `mytown.cmd.assistant.ranks.add`

Adds a rank to the town with the specified name. If the template rank is specified it will copy all the permissions from it to the newly created rank.

It will give an error if:
 * Rank with the same name already exists inside the town.

`/town ranks remove <rank>` with perm `mytown.cmd.assistant.ranks.remove`

Removed the specified rank from the town.
It will give an error if:
 * The rank specified is of type `mayor` or `default`.

`/town ranks set <rank> <type>` with perm `mytown.cmd.assistant.ranks.set`

Sets the type of the rank. Type can have the values: 
 * `default` - any players that join gain this rank - is unique
 * `mayor` - mayor type of rank - is unique
 * `regular` - any other rank 


It will give an error if:
 * The current type of the rank specified is unique.

`/town ranks perm add|remove <rank> <perm>` with perm 	`mytown.cmd.assistant.ranks.perm.add|remove`

Adds/removes a perm from the specified rank.

`/town ranks perm list [rank]` with perm `mytown.cmd.assistant.ranks.perm.list`

Shows a list of all the perms found in the specified rank or your current rank.

`/town ranks reset` with perm `mytown.cmd.asssistant.ranks.reset`

Resets the ranks to their default state. Useful if the town was created long ago and no longer has certain perms due to database loading.

Admin town creation and management

`/townadmin new <name>` with perm `mytown.adm.cmd.new`

Creates an `AdminTown` which:
 * Does not support adding residents to it by default.
 * Does not have any ranks (unless `/ta ranks reset <town>` is executed)

`/townadmin delete <town>` with perm `mytown.adm.cmd.delete`

Deletes the specified town.
It will give an error if:
 * The town with the specified name is not found.

`/townadmin add <resident> <town> [rank]` with perm `mytown.adm.cmd.add`

Adds the resident to the specified town with the specified rank or the default rank.
It will give an error if:
 * Resident is already in town.

`/townadmin kick <resident> <town>` with perm `mytown.adm.cmd.kick`

Kicks the resident from the town.
It will give an error if:
 * Resident is not inside the specified town.

`/townadmin blocks extra set|remove|add <town> <amount>` with perm 	`mytown.adm.cmd.blocks.extra.set|remove|add`

Sets/removes/add to the amount of extra town blocks a town can have.
Default for each town is 0

`/townadmin blocks far set|remove|add <town> <amount>` with perm 	`mytown.adm.cmd.blocks.farClaims.set|remove|add`

Sets/removes/add to the amount of maximum far claims a town can have.
Default for each town is 0. (With config `maxFarClaims`)

`/townadmin perm town list <town>` with perm `mytown.adm.cmd.perm.town.list`

Lists the flags and their values from the town specified.

`/townadmin perm town set <town> <flag> <value>` with perm `mytown.adm.cmd.perm.town.set`

Sets the flag to the specified value in the town.

`/townadmin perm town whitelist <town>` with perm `mytown.adm.cmd.perm.town.whitelist`

Gives the player a whitelister tool.

`/townadmin claim <town> [range]` with perm `mytown.adm.cmd.claim`

Claims a chunk for the town specified. The chunk claimed, if unclaimed does not return any money.
If the chunks are not adjacent to the main claim then it will be considered `one` far claim.
If range is specified it will claim all the chunks around the player in that radius. Ex: `/townadmin claim <town> 1` will claim a 3x3 of chunks around the player.
It will give an error if:
 * One of the chunks is already claimed.
 * There is a town in a radius (Default: 5 chunks) around one of the chunks with the `nearby` 	flags set to `false`
 * It is a far claim but the town reached the limit of far claims.

`/townadmin unclaim` with perm `mytown.adm.cmd.unclaim`

Unclaims a chunk.
It will give an error if:
 * The chunk is not claimed by any town.

`/townadmin borders show <town>` with perm `mytown.adm.cmd.borders.show`

Shows the borders of the specified town.

`/townadmin borders hide` with perm `mytown.adm.cmd.borders.hide`

Hides the borders of the town that was currently showing them.

`/townadmin rename <town> <name>` with perm `mytown.adm.cmd.rename`

Renames the specified town with the given name.
It will give an error if:
 * Name is already taken.

Admin resident management

`/townadmin res blocks extra set|remove|add <town> <amount>` with perm `mytown.adm.cmd.res.blocks.set|remove|add`

Sets/removes/adds to the amount of extra blocks the resident adds to the maximum extra blocks of the town. 

Admin rank management

`/townadmin ranks add <town> <name> [templateRank]` with perm `mytown.adm.cmd.ranks.add`

Adds a rank to the specified town. If template rank is specified it will copy its permissions to the newly created rank.

It will give an error if:
 * Rank already exists in town.

`/townadmin ranks remove <town> <rank>` with perm `mytown.adm.cmd.ranks.remove`

Removes a rank from the town.
It will give an error if:
 * Rank does not exist.
 * Rank is of type `mayor` or `default`.

`/townadmin ranks set <town> <rank> <type>` with perm `mytown.adm.cmd.ranks.set`

Sets the type of the rank. Type can have the values: 
 * `default` - any players that join gain this rank - is unique
 * `mayor` - mayor type of rank - is unique
 * `regular` - any other rank 

It will give an error if:
 * The rank you want to set is unique

`/townadmin ranks perm add|remove <town> <rank> <perm>` with perm `mytown.adm.cmd.ranks.perm.add|remove`

Adds the perm to the specified rank from the town.

`/townadmin ranks perm list <town> <rank>` with perm `mytown.adm.cmd.ranks.perm.list`

Lists the permission of the specified rank from the town.

`/townadmin ranks reset <town>` with perm `mytown.adm.cmd.ranks.reset`

Resets the ranks of the specified town to the default settings.

Admin plot management

`/townadmin plot show <town>` with perm `mytown.adm.cmd.plot.show`

Shows the plots of the specified town.

`/townadmin plot hide` with perm `mytown.adm.cmd.plot.hide`

Hides the plots.

`/townadmin plot perm set <town> <plot> <flag> <value>` with perm `mytown.adm.cmd.plot.perm.set`

Sets the flag value of the plot from the town specified.

`/townadmin plot perm list <town> <plot>` with perm `mytown.adm.cmd.plot.perm.list`

Lists the flags and their values from the plot in the town specified.

`/townadmin plot rename <town> <plot> <name>` with perm `mytown.adm.cmd.plot.rename`

Renames the plot specified.
It will give an error if:
 * There already exists a plot with the same name.

`/townadmin plot add owner <town> <plot> <resident>` with perm `mytown.adm.cmd.plot.add.owner`

Adds an owner to the plot in the town specified.
It will give an error if:
 * The resident is not a member of the specified town.

`/townadmin plot add member <town> <plot> <resident>` with perm `mytown.adm.cmd.plot.add.member`

Adds a member to the plot in the town specified.
Members do NOT have to be a resident in the town.

`/townadmin plot remove <town> <plot> <resident>` with perm `mytown.adm.cmd.plot.remove`

Removes a member/owner from the plot.
It will give an error if:
 * The resident is not a member of the plot.

`/townadmin plot info <town> <plot>` with perm `mytown.adm.cmd.plot.info`

Shows information about the plot inside the town.

`/townadmin plot delete <town> <plot>` with perm `mytown.adm.cmd.plot.delete`

Deletes the plot from the specified town.

Admin wild management

`/townadmin perm wild list` with perm `mytown.adm.cmd.perm.wild.list`

Lists the flags and their values from the wild.

`/townadmin perm wild set <flag> <value>` with perm `mytown.adm.cmd.perm.wild.set`

Sets the specified flag's value to the one specified inside the wild.

Other admin commands

`/townadmin config reload` with perm `mytown.adm.cmd.config.reload`

Reloads the config files of:
 * MyTown.cfg
 * All protection files
 * DefaultRanks.json
 * WildPerms.json
 * FlagsConfig.json

`/townadmin safemode <on|off>` with perm `mytown.adm.cmd.safemode`

Changes the state of the server to only allow ops to join the server.
WARNING: This feature is currently not fully working, usage is not recommended!

`/townadmin debug itemClass` with perm `mytown.adm.cmd.debug.item`

This is a command used for making protections in an easier way.
Shows the full class hierarchy of the item in hand.
If the item is an itemBlock it will show the hierarchy of the block instead.

Database management

`/townadmin db purge` with perm `mytown.adm.cmd.db.purge`

Completely wipes the tables inside the database.