-
Notifications
You must be signed in to change notification settings - Fork 22
Commands
- Regular player commands
- Town creation and claiming
- Town commands for 'assistant' residents
- Town commands for regular residents
- Town commands for anyone
- Plot management
- Rank management
- Admin commands
- Admin town creation and claiming
- Admin plot management
- Other admin 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 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 tofalse
/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 tofalse
- 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 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
orvalue
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
orrank
is invalid. -
rank
is Mayor.
/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 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 <command>
with perm mytown.cmd.everyone.bank
/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 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)
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.
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
ordefault
.
/town ranks set <rank> <type>
with perm mytown.cmd.assistant.ranks.set
Sets the type of the specified 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.
/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.