How to configure
Welcome and thank you for choosing CraftGuard ! Here is a little guide to show you how to start.
After installing it, start your server. If everything gone right, you should see a message saying that CraftGuard is starting and another saying that the default config file had been written.
Now you can stop your server and go back to the plugins directory. A new directory named CraftGuard should have been created, with in it a file entitled config.yml wich contains CraftGuard's config. Open it with a text editor (i recommend Notepad++, remember to configure 2 spaces-wide tabulations), it should look like that :
craftguard: default: granted: - '22' - '26' - '44' permission: default config: log: false denymessage: You don't have permission to craft this ! baseperm: craftguard checkfurnaces: true preventiveallow: true
Let's study that. First, there a two main nodes in the file : craftguard and config.
CraftGuard node (Lists)
This node contains your lists.
craftguard: default: granted: - '22' - '26' - '44' permission: default pointlessgroup: granted: - '46' - '44:2' #You can place comments on empty lines (i.e to remember what object this id corresponds to) permission: pointless.permission inheritance: default
As you can see, each group is defined by a node containing a list (called granted) and a permission string (called obviously permission). First, the granted list must contain all the blocks granted to the group (in ids, you can get conversion here) between apostrophes, on id on each line. By the way, lines have to start with a dash (-). If you want to associate a damage value to one id, you have to put it next to the id, after a colon. The result should look like the second line of the granted list of the pointlessgroup in the example.
Inheritance
If you put a node named inheritance with a valid list name as value, your list will inherit values from the indicated list. It will save a lot of space and time if you grant the same crafts to a lot of lists. Note that if you add some crafts to a list with the /cg add command, you will have to do a /cg reload in order to reflect your changes on other lists which inherit from that list.
Don't forget to put the permission line after your granted list. Remember that (see baseperm in the config node) it will only be the second part of the permission string (if you set permission to test.pointless and your baseperm to craftguard, the permission of the list will be craftguard.test.pointless).
Config node
The config node has 3 parameters.
config: log: false denymessage: You don't have permission to craft this ! baseperm: craftguard checkfurnaces: true preventiveallow: true
log
This property can take true of false as parameter. It defines if when a craft is denied, a message will be left in the console for logging. Default on false
denymessage
This property defines the message that will be shown to the user when he can't craft something.
baseperm
This property defines the first node of permission. In effect, in order to propose a permission that allows all crafts, the first node of groups is the same, and it is defined by baseperm. Permission for each group is formed like that : <baseperm>.<group's permission>
checkfurnaces
This property defines if smelting should be checked like crafting. Default at true.
preventiveallow
This defines if when an item is not in any list, it's craft should be granted(true) or blocked(false) to everyone. Default at true