Step 9: World Guard - For a safer tomorrow
World guard is a mod that is key to just about every mod that gives some form of protection to an area, a block, or a player. For the most part you don't need to configure world guard for mods, they detect it automatically and do what they need. What we want to do though is understand how its config files work, and some key things to enable or disable so that students can't ruin another students time.
World guard has a default config file located at "(minecraft folder)\plugins\worldguard\config.yml" that will be used for all worlds that your server is hosting. This is the main config file we want to work with when getting started and what I'll cover here. Worldguard also keeps seperate config files for each world in "(minecraft folder)\plugins\worldguard\worlds" with each folder containing three files:
blacklist.txt "This is where you ban certain items, blocks, and actions with various levels of punishment."
config.yml "This is a blank file at first, but can be used to over ride settings in the default config file"
regions.yml "If you do not enable SQL support in the default config file, this file stores all the regions WorldGuard knows of for this world"
World guard has a default config file located at "(minecraft folder)\plugins\worldguard\config.yml" that will be used for all worlds that your server is hosting. This is the main config file we want to work with when getting started and what I'll cover here. Worldguard also keeps seperate config files for each world in "(minecraft folder)\plugins\worldguard\worlds" with each folder containing three files:
blacklist.txt "This is where you ban certain items, blocks, and actions with various levels of punishment."
config.yml "This is a blank file at first, but can be used to over ride settings in the default config file"
regions.yml "If you do not enable SQL support in the default config file, this file stores all the regions WorldGuard knows of for this world"
Regions
Regions are areas in a Minecraft world that WorldGuard interacts more directly with. Its important to know that while we can configure many different settings in the default Config file, its possible to over ride them in an area using WorldGuard regions and setting them up with specific rules. You'll be creating regions by using the WorldEdit selection tool and all of it selection options are usable with WorldGuard, like spheres and cylinders.
The default config.yml file
Below is my config.yml, I'll be adding comments that look like ##(comment)## to the code below to help explain the important areas. You'll see that I really don't disable or change much of the basic minecraft game play here in the config file, I have mods that will do things most of the time, or I will use the world specific configs if I need something special, like disabling mob spawns in a creative only world. You can copy and past the below text into your own config.yml file if you wish and it should still load.
I have setup SQL in my config, so be sure to add a "worldguard" database to your SQL server before you start the server again when using my configuration.
I have setup SQL in my config, so be sure to add a "worldguard" database to your SQL server before you start the server again when using my configuration.
config.yml
Blacklist.txt
The blacklist file is a little hard to begin working with, but it is a very powerful tool to prevent certain problematic behavior such as using certain items, placing certain blocks, or destroying something with a specific tool. The basic structure is to pick the items, pick the event, and then pick the action you want to take. You can also create custom permissions for users or groups to let them ignore the blacklist setting if necessary. Here are some examples below with my comments again looking like ##(comment)##.
You can setup the blacklist to use SQL instead of the text file, I've left it using the text file in my configuration as I find its much easier to copy/paste new things as needed, but if you have a large blacklist you might want to enable SQL to help with server lag.
You can setup the blacklist to use SQL instead of the text file, I've left it using the text file in my configuration as I find its much easier to copy/paste new things as needed, but if you have a large blacklist you might want to enable SQL to help with server lag.
Blacklist.txt
When you start your group, I would suggest denying TNT, Lava buckets, Ender Pearls, and Obsidian to help keep kids from doing anything too terrible at the start, then allowing them after explaining that they still need to be responsible.