Land protection mod. Create new towns, add members to it, set up personalised plots, configure plot/town permissions.


  • Towns
    Don’t be a loner. Play together by building small or big towns!
  • Nations
    Join nations to build your towns next to eachother and chat more easily
  • Town teleporting
    Don’t force your new recruits to walk, let them get to your town quick
  • Residents, assistants, mayors
    Towny-like hierarchical schema
  • HeroChat like chat, town/nation channel
    /ch tc – /g Hello! – /l Kle ära nussi – [TR][Mod]supercool[<3]: Buying iridium plates!
  • Tight protection
    Protects against most mod world changing items like IC mininglaser, BC quarrys, TC excavationwand etc. Tailored for FTB MindCrack modpack.
  • Permissions
    Claim only half plots for your roads so the one claiming next to it can use the other parts of the plot. Disable outsiders entering a plot or just cant loot or can access but cant build. Disable/enable quarries to make your plots safe against this old devil. And much more. Check it out using /t perm plot.
  • Autocomplete for all commands, tab away – /t in<tab> Sp0<tab>

Commands and perm nodes:

Any text that’s written like <this> means that it’s a command argument and it must be replaced by something that relates to the name.
Any text that’s written like [this] means that this argument is optional and must iether be removed or replaced by something custom.
Any text that’s written like this|this means that it’s a choice between these.
Text written in red means it’s a command.
Text written in blue behind the command means it’s the used permissions node the user has to have to use the command.

/ch [channel]<channel>
Lists all the possible channels and their abbrevations. Or switches the active channel you are chatting on.
Current channels:
[G] Global
[TR] Trade
[H] Help
[TC] Town
[NC] Nation

/g /tr /h /tc /nc <msg>
Sends a message to the specific channel without focusing (switching) it.
For global channels there’s a extra perm node – which is used to let people use capital letters in chat. Think what you will of why i have implemented this, but it has brought alot of peace to our server veteran players from the “average” “noob”.
For all channels there’s a perm node – – which enables color tag renaming from $<code> to §<code>. /g $2 Hi green $r, normal again, $l bold text.

/spawn mytown.ecmd.spawn
Starts a 60 sec spawn teleportation “spell”. This action is notified to everyone in localchat. This is done this way to stop players teleporting away in pvp or using it for any other quick getaway like after stealing, griefing or even drowning. Use the node mytown.adm.bypass.teleportwait to disable the wait time.

Shows the online players with their prefix and suffix. Ordered alphabetically by the name, not considering prefixes and suffixes.

/t    mytown.cmd
MyTown base command. Aliases are: /mytown and /town
This permissions node is required to access the commands. In pex you can define nodes like this:
– mytown.cmd(|.*) – to give full access to mytown normal commands. Don’t give the node mytown.* because that will give the players admin commands and bypasses making the mod void.

/t help [assistant|mayor|nation]
Shows MyTown commands. If using the argument, then shows the commands for that specific group.

/t map [on|off]
Shows the MyTown status of your surrounding blocks/chunks. If using the argument then on turns on an automatic map display every time you cross a chunk border. Off turns this feature off.
The middle character is is displayed a bit lighter, this defines your current location.
All plots owner by you (using the command /t assignplot <name> from the assistant group) are displayed in yellow. All other plots your town owns are disaplyed in green. Plots owned by other towns are disaplyed in red. And plots not claimed by any towna re in white.
Plots marked with a cross (X) are plots assigned to someone in your town. Plots marked with an O are claimed land. Nonclaimed land is marked with a underscore (_).

/t list mytown.cmd.list
Lists all the towns in game, ordered by the number of residents in the town from highest to lowest.

/t info <name>
Shows information about a town. While being in a town just /t is the short version of /t info <yourtown>
——–[[ Quantum ]]——–
Town blocks: 117/992 Nation: Quantum
Mayor: [Dev]alphaest*
Assistants: [Owner]Sp0nge, aelica
Residents: [Vet]marymarymary, GraphicRabbit, [Vet]Zugill,

First line – Town name, in green means your town, red means someone elses.
Second line – how many plots the town has claimed and how many it can in total; nation it belongs to.
Third line – Town residents of the status Mayor.
Fourth line – Town residents of the status Assistant.
Fifth line – Normal town residents.

/t res [name]    mytown.cmd.res
Shows information about you or the player you specify by their username.
——–[[ [Dev]alphaest* ]]——–
Member from: 2012-12-22 15:01:12
Last online: online
Member of: Quantum, Mayor
Friends: [Vet]Zugill
Friends of: [Troll]kala

First line – the user prefix, name, suffix you were querying for. The asterix means that hes online.
Second line – Date and time of first login to the server (or when mytown was installed).
Third line – Date and time when last online, or “online” when he’s on right now.
Fourth line – Town name which hes part of, or ‘none’; The rank in that town.
Fifth line – Who are his friends. Only shown if he has defined any friends.
Sixth line – Whos friend is he. Only shown if someone has added him as their friend.

/t friend add|remove <name> mytown.cmd.friend
Adds or removes players from your friends list.
This list is used in conjunction with the town permissions “friend”, where you can define different permissions for your friends on your plots (/t perm res or /t perm plot), or define the default for all your residents by using /t perm town. Friends permissions are used ONLY when the plot owner is set using /t assignplot.

/t spawn [name]    mytown.cmd.spawn.(own|other)
Teleport yourself to your town spawn or some other town spawn by specifing the town name. The town spawn has to be set beforehand using the assistant group command /t setspawn.

/t new <name>
Creates a new town by the name specified in <name>. The user must not be a member of any town and the town name can not be used by any currently existing town. The user current location is used to claim the first town block. For any town block claiming restrictions refer to the /t claim command under town assistants.

/t accept    mytown.cmd.accept
Accepts a incoming town invite. The user must not be a member of any town and has to have a pending town invite. Refer to the /t invite <name> command under town assistants for further reference.

/t deny   mytown.cmd.deny
Rejects a incoming town invite. Using this command removes the pending town invite and allows for other towns to invite you. The user must not be a member of any town and has to have a pending town invite. Refer to the /t invite <name> command under town assistants for further reference.

Town residents
/t leave mytown.cmd.leave
Leave the current town. This command cannot be used by town mayor, refer to /t delete to remove your town.

/t online
Lists the online players from your town in the chat.

/t perm plot|res|town<node>
Shows the current plot, your plots or your town permissions.

/t perm plot|res|town set <key> <value> mytown.cmd.perm.set.<node>.<key>
Sets the permission of <key> to the defined <value> for the “node” (your current plot, all your plots [called resident] or your town). All the possible permissions and their keys can be listed using /t perm plot|res|town. All the permission, keys are the same for all nodes except for “the wild” definition using /ta perm wild[:n].

/t perm plot|res|town force [key]    mytown.cmd.perm.force.<node>.(<key>|all)
Forces the node child nodes to set their values (for the defined key) to inherit. While on inherit your current node values will used in the child nodes.

Town assistants
/t claim  [rect <n>]   mytown.cmd.claim
Claims land for your town.
Specifying the argument claims blocks with in a square with the radius from middle you specify.
Land is claimed until an error happens or all expected blocks are claimed. Errors may include: Land already claimed, Too close to another town, no free blocks.
The claimed block has to be atleast a specified amount of chunks away from a town which isn’t yours and is not in your nation. This amount can be configured in the config file.

How many plots a town has is defined by multiple things:
total blocks = perResidentBlocks + extraBlocks + nationBlocks.
perResidentBlocks = mayorMulti * (for each res: + resMulti)
nationBlocks = nationAddsPerResident * numResidents + nationAddsBlocks

mayorMulti is defined in PEX by mytown.mayor.blocks.(2|4|8|16|32) default 1
resMulti is defined in PEX by mytown.resident.blocksmulti.(2|4|8|10) default 1
extraBlocks can be set by the admin command /ta extra <town> <count>. It can be both positive and negative. Whatever the admin feels like doing to the town plot count.
nationAddsPerResident and nationAddsBlocks are defined in the config. Default is 0.

/t unclaim [rect <n>] mytown.cmd.unclaim
Works similar to claim, just the reverse.
Unclaimed land will lose all its custom permissions, owners and so on and is not reversible. Once unclaimed, anyone can claim the land again by the rules above. If the town available plots had changed so that the town owned more land that it can, no extra blocks can be claimed until some more are freed up.

/t invite <name>      mytown.cmd.invite
Sends a town invitation to a player who is not part of a town. The player can accept or deny the request. If it’s accepted, everyone in town will be notified of the player joining. If its rejected, no info will be given.
Refer to non-resident group commands /t accept and /t deny for further reference.

/t kick <name>    mytown.cmd.kick
Removes the player from town. If you are an assistant you can only kick players. If you are the mayor you can kick everyone but yourself. If you, the mayor, don’t want to be in this town anymore, set a new mayor using /t mayor <name> and then /t leave or delete the town using /t delete.

/t setspawn     mytown.cmd.setspawn
Sets the town spawn. Refer to Everyone group command /t spawn [name] for further reference on how to teleport. The town spawn can be anywhere on any town block that’s owned by your town.
Your current excact position and even look is saved, so watch where your watching.

/t assignplot <name>      mytown.cmd.plot
Assigns the plot you are standing/flying on to the specified player. Currently there is no command to clear the owner of a plot, you can unclaim and reclaim the plot for that.

After the plot is assigned the owner of the plot can do anything on it and the perm node “friend” gets active if the owner has defined any friends. Town assistants and mayors can still build on the plot and cannot be expelled by any permission.
(PVP rules still apply as defined in the config)

Town mayor
/t assistant add|remove <name> mytown.cmd.assistant
Sets a town member rank to assistant or to resident. Assistant can also build on all town plots like the mayor by default and cannot be expelled from plots by using the “town” permission node.
Assistants cannot delete expell the mayor or delete the town or use any other mayor-only command.

/t mayor <name> mytown.cmd.mayor
Sets a new mayor for the town. You are given the assistant rank.

/t rename <name>   mytown.cmd.rename
Renames the town. The new town name cannot be already in use.

/t delete mytown.cmd.delete
Deletes the town. There is NO going back!

Nation commands

/t nation info [name]     mytown.cmd.nationinfo
Shows information about a nation.

/t nation list    mytown.cmd.nationlist
Lists all the nations in the server.

Town mayor, not in nation
/t nation new <name> mytown.cmd.nationnew
Creates a new nation. The name can be the same as a town name but cannot be used by another nation.

/t accept       mytown.cmd.nationaccept
Yes it’s the same command as joining a town. Accepts a pending nation invitation.

/t deny mytown.cmd.nationdeny
And also same as town. Rejects a pending nation invitation.

Town mayor, capitol of a nation
/t nation invite <name>     mytown.cmd.nationinvite
Sends an invitation to a town not in nation already. The message is shown to the mayor. If the mayor is not online, the invitation will fail. If the mayor logs off after a invitation message, the invitation will still be pending. The invitation will be canceled if the town is deleted, the invitation is accepted, rejected or the server is restarted.

/t nation kick <name>      mytown.cmd.nationkick
Kicks the named town out of the nation. Cannot kick you own town.

/t nation transfer <name>         mytown.cmd.nationtransfer
Sets a new capitol to the nation. Your town will be given the normal member status.

/t nation delete mytown.cmd.nationdelete
Deletes a nation.

Town mayor, normal member of nation
/t nation leave   mytown.cmd.nationleave
Leave your nation. Cannot be used by the capitol.

Admin commands and perm nodes:

/ta   mytown.adm.cmd
Command itself. This node is needed to even get access to the subcommands. In pex you can use it like this:
– mytown.adm.cmd.(|.*) – this will give access to the command itself and all subcommands

/ta ?    mytown.adm.cmd.<cmd>
MyTown admin commands. I wont go into detail what they are and how they work. Use the ingame command listing and /pex user <name> toggle debug to find your needs.

/ta perm town|plot|server|wild[:n]
Shows the defined node permissions.

The overall permissions inheritance tree is like this:
L World-Wild

L Town
L Resident
L Plot

The Server node is there just to have a default for towns to inherit from when they mess up and don’t know what is what. You cannot set null values into this or the wild-root node because they have nothing to inherit from.
Wild permissions are a little bit different because there are nodes that are useless or too cpu-intensive to run. Like for wild there is no plot owner so setting the friend or nation node woul be pointless. Use the ingame listing to see the available permissions.
Wild:n node is the dimension specific wild. use the dimension id’s as the ‘n’.

/wrk    mytown.adm.cmd.wrk    experimental
Switches the user between admin and fakeadmin pex group depending if the user has op or not.
This command is made for my server so we can switch between play and work modes.

When the user is not op
1. It adds the user into operators list
2. It adds the user into MFFS bypass list if MFFS is installed
3. It adds the user into admin pex group (owner if you are Sp0nge, dev if you are alphaest)
4. It sets your game mode to 1

When the user is op
1. it removes the user from the operator list
2. it removes the user from the MFFS bypass list
3. It sets the user group to fakeadmin (fakeowner if you are Sp0nge, fakedev if you are alphaest)
4. It sets your gamemode to 0

To run this command the user needs to have the above perm node and also the right to switch the group in pex – so permissions.manage.membership.Admin or (.owner or .dev) is needed for the fakegroup and fakeadmin, fakeowner, fakedev for the work group.
There is currently no way to define yourself into which group you want yourself to be switched. The custom groups for me and sp0nge are hardcoded as of now.
I’m not really sure iw ill keep this command in this mod because its very unrelated.
So for now – if you want to use this nifty shortcut for your work, like we do, Set yourself into the pex group Admin and make a new pex group called FakeAdmin which inherits from default.

/gm [mode] [name] or /op
A simpler version of the /gamemode command.
Running this command without any arguments toggles your gamemode between 0 and 1.

/setspawn [dim] [<x> <y> <z>]    mytown.adm.cmd.setspawn or /op
Sets the server/dimension spawn. As far as i know it’s only useful to be used on overworld, dimension 0. This does not only sets the target location for /spawn command but also changes the actual place where players spawn when they get killed, with no bed or join the server for the first time.

/tp [player] <targetplayer> | /tp [player] <x> <y> <z> or /op
The original teleport command with the difference of being interdimensional in self to player or player to player teleportation.

Admin ByPasses

This will give you pvp rights everywhere, doesn’t matter what’s defined in the config.

As the node says, you don’t have to wait for teleport casting spells, it will teleport you instantly.

Currently defined perms: None, Enter, Loot, Access, Build. Use the /ta perm server set out ? command to find the current listing.
Will give you the defined level bypass. It is non-inheriting. So having Build bypass does not mean you can loot stuff.
This bypass can help you any place where you are blocked with the message “you cannot use that here” or “you cannot build here” or “you cannot loot here” and so on. Anything that is not player specific, like those defined in town permissions (quarrys, tnts etc) will still stay blocked unless you use the townadmin permissions command to change them.

Shows the chunks claimed by the town by using /t info <name>

Shows the player current dimension and coordinates by using /t res <name>

Example PEX script

Dependencies: PermissionsEx


  • Download MyTown and place it in your servers mods/ folder
  • Download MyTownLib and place it in your servers mods/ folder
  • Download PermissionsEx, place it in servers mods/ folder
  • Start server, stop server to generate config/MyTown/MyTown.cfg and database
  • Edit the config file, especially the # protex # group, enable all the mods you have and any vanilla related node you want to use (like creepers, mob location etc)
  • Edit the config/permissions.yml file, remove atleast admin and plot count nodes from default group. Refer to the commands manual and/or the exxample pex script below
  • Start your server and play



  • Updated to Minecraft 1.5.2/1.5.1 & forge version independence
  • This means that hopefully the next mc version this will also work
  • Changed the connection NRE’s to say in the exception that there’s no db connection.

For 1.5.2/1.5.1

For Minecraft 1.4.7

MyTown Lib: