WorldGuard: Regions
Post: #1
WorldGuard is a plugin which collaborates with WorldEdit to protect regions you define by means of a cuboid selection. It's a very useful tool and it's certainly not limited to region protection but for now, that is what this tutorial will be about.

[size=large][b]Regions[/b][/size]
WorldGuard Regions can be incredibly useful and have many purposes. Their main purpose is to protect builds of certain players by defining a region with a cuboid selection and then adding the player to the region.

To begin, take out your WorldEdit wand and mark your first and second positions.

You now have your cuboid selection and WorldGuard recognises it.

The command [color=#FF4500]/region define <regionname>[/color] will create the region but it won't add owners unless you specify them by using this command instead [color=#FF4500]/region define <regionname> <owner>[/color].

To add and remove owners and members after defining the region:
[color=#FF4500]/region addowner <regionname> <playername>
/region removeowner <regionname> <playername>
/region addmember <regionname> <playername>
/region removemember <regionname> <playername>[/color]

There is currently no difference between owner and member because we haven't given everyone the WorldGuard permissions which merely allow them to modify their region. We can give say, Merchants, the ability to modify any region they are owner of while the members are simply able to build there. But as I said, this has not been implemented. For now, please name the owner of the region as the prime builder(s) of that region so we have an organised format for understanding our regions. Furthermore, please name your region to something that can be understood. Do not name it '123' or 'test'... if it's a town/city and it has a name, please name it that. I do encourage you test all this by simply naming the region 'test' but remember to [color=#FF4500]/region remove <regionname>[/color].
You might say "why does it matter what it's called, people won't see the name anyway?"
Actually, those modifying the region will see it and I know from experience, poorly named regions are an absolute pain to manage.

[b][size=medium]Region Flags[/size][/b]
Once you have defined your region, you can set region flags.
Each flag has a default setting and the [color=#FFA500][font=Courier]build[/font][/color] flags default is [font=Courier][color=#FFA500]deny[/color][/font], so you don't have to touch it.
This means anyone who is not an owner or member of the region cannot build inside it's borders (excludes anyone with the permission nodes [color=#00BFFF][font=Courier]worldguard.region.bypass.<world>[/font][/color] or [color=#00BFFF][font=Courier]worldguard.*[/font][/color])

The full list of region flags can be found in this link
The most useful flags are:

[color=#FFA500][font=Courier]greeting[/font][/color] Message to show a player when they enter a region.
[color=#FFA500][font=Courier]farewell[/font][/color] Message to show a player when they leave a region.
[color=#FFA500][font=Courier]pvp[/font][/color] Allow or block PvP.
[color=#FFA500][font=Courier]mob-damage[/font][/color] Allow or block mob damage on players.
[color=#FFA500][font=Courier]mob-spawning[/font][/color] Allow or deny mobs spawning.
[color=#FFA500][font=Courier]creeper-explosion[/font][/color] Allow or block creeper damage to terrain and players.
[color=#FFA500][font=Courier]enderman-grief[/font][/color] Allow or prevent endermen from picking up or placing blocks.
[color=#FFA500][font=Courier]ghast-fireball[/font][/color] Allow or block fireballs damage to terrain and players.
[color=#FFA500][font=Courier]tnt[/font][/color] Allow or block TNT.
[color=#FFA500][font=Courier]lighter[/font][/color] Allow or block flint and steel.
[color=#FFA500][font=Courier]fire-spread[/font][/color] Allow or block the spread of fire.
[color=#FFA500][font=Courier]lava-fire[/font][/color] Allow or block whether lava can start fires.
[color=#FFA500][font=Courier]use[/font][/color] Allow or block the ability to use doors, buttons, pressure plates, levers, etc

To flag a region, type [font=Courier][color=#FF4500]/region flag <regionname> <flag> allow/deny[/color][/font].
Most flags use [font=Courier]states [/font](like the one above) others use [font=Courier]strings [/font]([font=Courier][color=#FFA500]greeting[/color][/font] and [color=#FFA500][font=Courier]farewell[/font][/color]) and some use [font=Courier]boolean[/font] ([font=Courier]true/false[/font])

After you have defined the region, make sure you set [color=#FFA500][font=Courier]greeting[/font][/color] and [color=#FFA500][font=Courier]farewell[/font][/color] flags:
[font=Courier][color=#FF4500]/region flag <regionname> greeting You have entered a region owned by Suchandsuch[/color][/font]
[font=Courier][color=#FF4500]/region flag <regionname> farewell You have left Suchandsuch's region[/color][/font]

Please write their proper Minecraft name and do not use their nick.
I am not simply prejudiced towards nicknames, I just get really sick of having to first type [font=Courier][color=#FF4500]/realname <fullnickname>[/color][/font] every time before merely TP'ing to someone and when it comes to editing lines in WorldGuard, I do not want to deal with it at all. It's a pain in the royale arse so please make the effort and use proper names as much as you possibly can when using WorldGuard.

[size=medium][b]Redefining a region[/b][/size]
Occasionally you will stumble upon the fact that your region is not big enough or you've accidentally overlapped someone else's region or what ever reason it is, you need to change the border of your region.

To do this, select the new area as a cuboid and type /region redefine <regionname>
The benefit of doing this instead of just removing the region and starting over is you don't have to set the members and flags again, the only change to the region is its cuboid.

[size=medium][b]Using WorldEdit to expand and contract the region[/b][/size]
By using the commands //expand and //contract, you can define regions 100 times faster and more simple.

When expanding or contracting the region, you must either set a direction in the line or simply point yourself in the direction, using the command [font=Courier][color=#FF4500]//expand <amount> [direction][/color][/font]
As not everyone has a mini map or compass mod installed, setting directions with compass points often involves a lot of guessing. I simply point myself in the direction but I also use [color=#FF4500][font=Courier]//expand <amount> up/down[/font][/color], as up and down are pretty simple to figure out... I really must get a mini-map mod.

Another expand option is [font=Courier][color=#FF4500]//expand vert[/color][/font]
This will change the [font=Courier]y[/font] coordinate to 0-256. This is very useful but remember, other players might have mines somewhere below the region. If you don't need all of the terrain underneath your builds, then don't do this.

[size=medium][b]Regions inside other regions [i](regionception)[/i][/b][/size]
Lets say you have a town and you wish to set up plots for your citizens to build in. You can restrict a player to a plot by defining another region inside your town region.

You can do this with [font=Courier][color=#FF4500]/region setparent <child> <parent>[/color][/font]
Where child is the plot and parent is your town.

Start by selecting the area as normal and defining a new region.
[Image: ]

Expand the region if need be...
[color=#FF4500][font=Courier]//expand 20 up[/font][/color]
[Image: ]

Define the region plot...
[font=Courier][color=#FF4500]/region define obsidia_plot1 vlperx[/color][/font]
[Image: ]

And set the parent.
[font=Courier][color=#FF4500]/region setparent obsidia_plot1 obsidia[/color][/font]
[Image: ]

Child regions adhere to the flags of their parent region unless you set them otherwise.
[i]Note: The server uses Towny for town plots as well.[/i]
  Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)