All permission plugins use a file format called YAML. This file format is very good since it allows for coders to be able to get the information they need fairly quicky, but also means it is more sensitive to issues when writing the file. There are a few key issues that you must be aware of with these files
- Tabs will break the file
YAML files do not support tabs at all in the file. If the yaml scanners find a tab, they will cause the file to not be readable, thus causing your permission plugin to break. This means you cannot use a tab at all in the file. 2 spaces are like a tab, and so if you use a program like Notepad++, make sure you change the settings so that if you press tab, it will use 2 spaces instead.
- Spacing is key
The point of the spaces is, quite literally, to organize the information. Most use a 2-space hierarchy (that is, the difference is 2 spaces for a category). If you've ever looked at a windows file branch, it is very much a similar thing:
Windows:
YAML:
Happen to see a similarity? That's right, the colons after the words in YAML are typically the designation of a new category. In this case, category = folder in windows (with a couple extra features). Now then, there's a few things you can do with this. To understand this, you really need to look at it a whole new way
Example one:
Guest:
permissions:
prefix:
suffix:
info:
You can contain other "categories" within them. This allows for adding new attributes to the category, which you can further describe.
You can simply list the attributes of a category, or the properties that are contained within it. In permissions, this is most commonly seen when listing perm nodes, or groups that are inherited. One thing to note is that the dash must line up directly with the first letter of category's name (as seen above), and a space put after it.
Negation is another thing, which isn't native to yaml. for that reason, it's different for each permissions plugin, as they must create a character in which to negate the attribute. For each perm plugin, these are:
PEX: a '-'
bPerms: a '^'
Group Manager: a '-'
Permbukkit: using a 'perm.node: false'
The third and final bit to yaml in permissions is similar to the listing of attributes, but when there is only one (Groups and perm nodes do not do this however). You can pretty much just put the value of the category entirely directly after the word, wrapped in single quotes.
- Using apostrophes (The ' key)
When you have something that is suppose to be read as text, be sure to surround it with apostrophes. This will tell the readers that this is a line of words, and to read it as is. Sometimes a file needs these since YAML uses some characters to represent things, so an apostrophe in front and at the end will tell it to ignore the characters as special and to just use them.
- Giving Wildcard nodes
Wildcard nodes are nodes that summarizes or cover a subcategory of all the permissions inside of it. Each category (or, we'll use "folder" again ) has a list of permissions inside of it. Say we have these four nodes:
Note that when you assign a wildcard node that in order to deny something that falls under the wildcard node's category, you must deny before the wildcard node itself. Java reads files from top to bottom, and as soon as it finds a match it will use that.
The '*' node
This is a node that exists only in PermissionsEx. It is a node that is derived using reflection, which breaks bukkit API. To a normal everyday user, this isn't too bad, and might just harm a few things like certain perm nodes or the ability to /reload. What it does is grant all permissions for every plugin. You must assign it wrapped in single quotes, like so:
- '*'
The different Permissions Plugins
bPermissions - A simple, yet stable plugin. Good for beginners.
PermissionsEx - This is the most versatile user-end plugin, used by many server admins. (For 1.4.6 users: Use the latest dev build found here.)
Privileges - Fast, simple, and clean. Does not have fancy features.
More to come, but the I really don't recommend using any others atm.
Finding the errors yourself
Because you really want to do this yourself and become adept at it, there's a handy-dandy YAML parser online that will find errors in your file for you. Simply head on over to http://yaml-online-parser.appspot.com/ and paste your file into it. Read it for the line number where your mistake is and ta-da, you can fix 99% of common errors
A bit of an explanation of different errors:
This error, defined by the “/t”, means that there is a tab in the file. The parser is good enough to tell you where the tab is in the file by giving you a line number. To fix this error, just delete the tab.
This error means that you have forgotten to add a : where it was needed. Like the others, this will tell you where the : is missing, so all you have to do is add the : in the correct spot, usually at the end of the line.
This error means that you forgot to close a String, or a line. Basically, you have a ' in a line and forgot to add a ' at the end of it. The parser will usually give you the line that this happens on, but sometimes it will not. You just need to add the ' to the line that has a ' in it already.
How to receive help here
Post your yaml configuration in either tags or http://pastie.org and leave a link. Example for tags:
This is your yaml file [/code]
We currently can't use tags, just use pastebin.
Post relevant info, including which plugin you are using
Explain your issue, and the steps you've taken
Don't use obnoxious fonts or colours. We are all perfectly capable of reading things.
If it's possible, could I ask someone to check over my current permissions and tell me if I've got it right?
I'm sure it's rather simple. Only 4 Groups to separate Perms into. (Admin, Mod, Common and Default)
I'm not finished with them, I do feel like I need to add a sort of 'VIP' Group or something. But as for what I have right now, How do they look? It's a direct Copy-Paste from the PermissionsBukkit folder.
If it's possible, could I ask someone to check over my current permissions and tell me if I've got it right?
I'm sure it's rather simple. Only 4 Groups to separate Perms into. (Admin, Mod, Common and Default)
I'm not finished with them, I do feel like I need to add a sort of 'VIP' Group or something. But as for what I have right now, How do they look? It's a direct Copy-Paste from the PermissionsBukkit folder.
If it's possible, could I ask someone to check over my current permissions and tell me if I've got it right?
I'm sure it's rather simple. Only 4 Groups to separate Perms into. (Admin, Mod, Common and Default)
I'm not finished with them, I do feel like I need to add a sort of 'VIP' Group or something. But as for what I have right now, How do they look? It's a direct Copy-Paste from the PermissionsBukkit folder.
As Lord_Ralex pointed out, it's best to use pastebin or pastie until the code tags are fixed. The main things I did notice however were spacing errors:
Finally we have somewhere that people can post there permission problems! Hopefully we won't see as much HELP ME WITH MAH PERMISSIONS THEY DONT WORK!!!! topics any more.
Rollback Post to RevisionRollBack
Use the quote or reply button on my post to ensure a reply.
As Lord_Ralex pointed out, it's best to use pastebin or pastie until the code tags are fixed. The main things I did notice however were spacing errors:
Also make sure you always point out which perms plugin you are using, as some people often get the filetypes confused
Thank you! I've loaded that into my permissions file, and now I need someone to come online and test it for me.
Also, I did mention PermissionsBukkit in my first post.
Ive read all the help things, and i used the parsar, it didnt help, it just told me to remove all of my colons.
heres origonal help request:
Hi My Name is Eric, i am new to making minecraft servers, anyway when i try to promote either myself or another player on my server to a diffent rank i am getting an error that says "All commands are locked due to an error. Check the log and then try a '/manload'.)" so i go into my server to fid the log in the groupmanager folder and i have pasted two links of where you can find it. either way, afterwards i went back into the game and typed in /manload, i then got a message that said " An internal error occurred while attempting to perform this command", Ive Listed all other plugins below. Please Help me. oh and ive also tried doing this in the console, i got the same result. http://pastebin.com/dERxwGYC - Error log http://pastebin.com/.../KJyG32Af - groups.yml http://pastebin.com/...lobalgroups.yml - globalgroups.yml
in game it says:
All commands are locked due to an error. Check the log and then try a '/manload'.)
when i do the manload it says:
An internal error occurred while attempting to perform this command
A List of my plugins are
-ChestShop3-46
-Essentails
-EssentailsChat
-EssentailsGeoIP
-EssentailsGroupManager
-EssentailsProtect
-EssentailsSpawn
-EssentailsXMPP
-iconomy
-LWC
-Questioner
-Register
-Towny
-TownyChat
-Treeassist
-WorldEdit-5.3
The file refuses to work and outputs the following errors:
ERROR:
while parsing a block mapping
in "<unicode string>", line 64, column 5:
default: false
^
expected <block end>, but found '<anchor>'
in "<unicode string>", line 81, column 16:
prefix: '&5Moderator '
^
EDIT: I found the problem on my own. Thank you anyway but it was a simple error I kept missing.
All permission plugins use a file format called YAML. This file format is very good since it allows for coders to be able to get the information they need fairly quicky, but also means it is more sensitive to issues when writing the file. There are a few key issues that you must be aware of with these files
- Tabs will break the file
- Spacing is key
Windows:
YAML:
Happen to see a similarity? That's right, the colons after the words in YAML are typically the designation of a new category. In this case, category = folder in windows (with a couple extra features). Now then, there's a few things you can do with this. To understand this, you really need to look at it a whole new way
Example one:
You can contain other "categories" within them. This allows for adding new attributes to the category, which you can further describe.
Example two:
Example three: - Link
Negation is another thing, which isn't native to yaml. for that reason, it's different for each permissions plugin, as they must create a character in which to negate the attribute. For each perm plugin, these are:
PEX: a '-'
bPerms: a '^'
Group Manager: a '-'
Permbukkit: using a 'perm.node: false'
Example four:
- Using apostrophes (The ' key)
- Giving Wildcard nodes
(pretending there's only these perms in this plugin.)
You could simplify this into three perms like so:
Or even more simplified into:
Note that when you assign a wildcard node that in order to deny something that falls under the wildcard node's category, you must deny before the wildcard node itself. Java reads files from top to bottom, and as soon as it finds a match it will use that.
The '*' node
This is a node that exists only in PermissionsEx. It is a node that is derived using reflection, which breaks bukkit API. To a normal everyday user, this isn't too bad, and might just harm a few things like certain perm nodes or the ability to /reload. What it does is grant all permissions for every plugin. You must assign it wrapped in single quotes, like so:
The different Permissions Plugins
PermissionsEx - This is the most versatile user-end plugin, used by many server admins. (For 1.4.6 users: Use the latest dev build found here.)
Privileges - Fast, simple, and clean. Does not have fancy features.
TotalPermissions - A new permissions plugin being developed by Lord_Ralex and myself.
More to come, but the I really don't recommend using any others atm.
Finding the errors yourself
A bit of an explanation of different errors:
This error, defined by the “/t”, means that there is a tab in the file. The parser is good enough to tell you where the tab is in the file by giving you a line number. To fix this error, just delete the tab.
This error means that you have forgotten to add a : where it was needed. Like the others, this will tell you where the : is missing, so all you have to do is add the : in the correct spot, usually at the end of the line.
This error means that you forgot to close a String, or a line. Basically, you have a ' in a line and forgot to add a ' at the end of it. The parser will usually give you the line that this happens on, but sometimes it will not. You just need to add the ' to the line that has a ' in it already.
How to receive help here
i looked over it closely and i can't see any issues whats wrong with it?
Extra dash in Elite group, and Lord_of_Cinder wasn't properly spaced out ^_^. Here you go:
http://pastie.org/pastes/4374601/text?key=figuvj0uz7z2e3g721vy8q
I'm sure it's rather simple. Only 4 Groups to separate Perms into. (Admin, Mod, Common and Default)
I'm not finished with them, I do feel like I need to add a sort of 'VIP' Group or something. But as for what I have right now, How do they look? It's a direct Copy-Paste from the PermissionsBukkit folder.
Use http://www.pastebin.com
As Lord_Ralex pointed out, it's best to use pastebin or pastie until the code tags are fixed. The main things I did notice however were spacing errors:
http://pastie.org/pastes/4378651/text?key=qdcdvwqzshrt1slgv1266g
Also make sure you always point out which perms plugin you are using, as some people often get the filetypes confused
Forgot to make a "groups:" field at the very beginning of the file, and also a good practice is not having multiple groups with the same rank number
http://pastie.org/pastes/4379524/text
Alright
Thank you! I've loaded that into my permissions file, and now I need someone to come online and test it for me.
Also, I did mention PermissionsBukkit in my first post.
I'm guessing you're using modifyworld? If so, give the perm node:
to permiss speaking. For every basic permission related to basic Minecraft (like, building and fighting mobs), give:
heres origonal help request:
Hi My Name is Eric, i am new to making minecraft servers, anyway when i try to promote either myself or another player on my server to a diffent rank i am getting an error that says "All commands are locked due to an error. Check the log and then try a '/manload'.)" so i go into my server to fid the log in the groupmanager folder and i have pasted two links of where you can find it. either way, afterwards i went back into the game and typed in /manload, i then got a message that said " An internal error occurred while attempting to perform this command", Ive Listed all other plugins below. Please Help me. oh and ive also tried doing this in the console, i got the same result.
http://pastebin.com/dERxwGYC - Error log
http://pastebin.com/.../KJyG32Af - groups.yml
http://pastebin.com/...lobalgroups.yml - globalgroups.yml
in game it says:
All commands are locked due to an error. Check the log and then try a '/manload'.)
when i do the manload it says:
An internal error occurred while attempting to perform this command
A List of my plugins are
-ChestShop3-46
-Essentails
-EssentailsChat
-EssentailsGeoIP
-EssentailsGroupManager
-EssentailsProtect
-EssentailsSpawn
-EssentailsXMPP
-iconomy
-LWC
-Questioner
-Register
-Towny
-TownyChat
-Treeassist
-WorldEdit-5.3
HELP PLEASEEE!!!!!
Oh and this is a 1.2.5 Bukkit server
It wasn't telling you to take out all your colons, it was just a spacing error
http://pastie.org/pastes/4382365/text - fixed groups.yml
btw, i appriciate your help.
i figured it out the permission was essentials.rules
but i had to go into another folder and delete a groups folder so i reloaded it
I tried recently to get a permissions file working via groupmanger and encountered several problems. The file can be found here:
http://pastebin.com/WFBU53uz
and a closer look here:
http://pastebin.com/WFBU53uz
The file refuses to work and outputs the following errors:
EDIT: I found the problem on my own. Thank you anyway but it was a simple error I kept missing.
Mind pastebinning the error in full?
Great
groups:
Heres the Permissions File:Player:
default: true
prefix: [Player]
options:
rank: '250'
permissions:
- teams.use
- HungerArena.join
- HungerArena.watch
- teams.teamchat
- plotme.use
Mod:
prefix: [Mod]
options:
rank: '50'
permissions:
essentials.*
inheritance:
- Settler
Admin:
prefix: [Admin]
options:
rank: '3'
permissions:
- '*'
inheritance:
- Mod
Owner:
prefix: [El Grande]
options:
rank: '1'
permissions:
- '*'
inheritance:
- Admin
groups:
Player:
default: true
prefix: [Player]
options:
rank: '250'
permissions:
- teams.use
- HungerArena.join
- HungerArena.watch
- teams.teamchat
- plotme.use
Mod:
prefix: [Mod]
options:
rank: '50'
permissions:
essentials.*
inheritance:
- Settler
Admin:
prefix: [Admin]
options:
rank: '3'
permissions:
- '*'
inheritance:
- Mod
Owner:
prefix: [El Grande]
options:
rank: '1'
permissions:
- '*'
inheritance:
- Admin