CraftBukkit Plugin Tutorials: PermissionsEx (15,000+ Views) (Recommended by the plugin author!)
60,466Views, 32 today
Get Embed Code
Level 44 : Master Narwhal
Posted 10/05/11 2:38:18 pm , last updated: 12/20/11 1:41:17 pm
I NO LONGER GIVE SUPPORT ON THIS BLOG POST, IT IS OUTDATED. I WILL BE WRITING A NEW BPERMISSIONS TUTORIAL IN THE NEAR FUTURE.
CraftBukkit Plugin Tutorials
Works with: CraftBukkit 1.0.0-R1
Download tutorials files (Important!): Here
This tutorial has been recommended by the plugin author himself, so you know it's gonna work!
Check out the mention in the post: Here
I noticed a lot of people in the forums asking for help with their servers permissions set up.I decided to give a full a tutorial as possible on using the most powerful and efficient permissions system available, PermissionsEx.This plugin, along with ModifyWorld and ChatManager (which both come with PermissionsEx), gives you complete control over what goes on in your server.
Before we get started, i suggest you head over to this link, and download 'NotePad++', the best text editor work working with YML files.If you do not want to download this program, that is fine, but NotePad++ will make your life 10 times easier, and it is highly recommended.You will also need to download the files i have provided using the link provided in the description above.
Installing PermissionsExHead to the link at the top of this post, and scroll down the post. Download the 'Latest Development Version'.Once downloaded, open up the .zip folder in either WinRAR or 7zip.
You should have FIVE.jar files:
Configuiring PermissionsExOnce the server has finished loading, stop your server, and go to your plugins directory.You will now find there are four new folders, one for each of the .jar files your loaded into your server.
First of all, go to the '/plugins/PermissionsEx' folder, inside you will find a 'config.yml' and a 'permissions.yml'.Ignore the 'config.yml', you do not need to do anything with this.
Now, open up the 'UsingPermissionsEx.zip' folder you downloaded from the link at the top of the page.Inside you will find a file called 'permissions.yml'. You now need to replace the 'permissions.yml' in the /plugins/PermissionsEx directory, with the one i have given you in the 'UsingPermissionsEx.zip'.
Now open it, and inside you will see i have already prepared the basic bones of the system for you.You may change the names of these groups as you wish, simply highlight the group name, and type out a new name. This will avoid messing up the spacing, causing the plugin to fail to load.
Now you may begin to configure the permissions, REMEMBER, never use tabs, as YML files dislike them, and it will cause your system to break.
Each group/user has a permissions list, all nodes you want available to a player/group must be defined in their list.
This allows any member in the group 'Default' to chat on the server.
This permission is needed for players to chat, as it is a part of ModifyWorld, which we will go into with more detail later.
You can also add negative permissions, that will disallow users access to that permission, for example.
This will disallow players in this group to use the servers chat. This is useful for not allowing users to speak until they have been promoted to a higher rank, that has access to 'modifyworld.chat', very useful for battling those spammers!
Permissions can be given on a per-world basis, which is great for multi-world servers. So let's say for example you have a creative world, and a survival world, and you want a group to be able to spawn items in creative, but not survival (using the plugin 'Essentials' as an example', you would write this as:
By giving the permission on a per-world basis, rather than defining it in the groups main permissions list, the group can now spawn items in the creative world, but because you haven't defined the permission in the survival worlds permissions, they do not have the permission to spawn items when in that world.When giving permissions on a per-world basis, the world name must be the same as the name of the world folder found in your server directory. All group/user/world names are CASE-SENSITIVE.
Finally, permissions can be given on a per-user basis also, which will override the group they are in, and give them their own personal permissions, plus the groups. You can define these by doing this:
This means that even if the group they are in has not got the 'essentials.item' permission, this user will have permission to use it.
In the 'UsingPermissionsEx.zip' folder i have provided, there is a file named 'Permissions-Set-Up.yml'.This file goes into detail about what each section of the permissions.yml is used for, and how to set up your permissions system without any error.
You can add permissions to a group in-game or via the console by using the command:
/pex group [group] add [permissions]
Replacing '[group]' with a group name, and '[permission]' with a permission node.
Applying players to groups.
There are two easy ways to assign players to groups, either by manually adding a group name to a user in the users section, like so:
Or by using in-game commands (providing you have permissions to, but for simplicity, i have added the correct permissions to the highest ranking group in the permissions.yml file i have given you), via a chat command or through the console., like so:
/pex user [playername] group set [group]
Replacing '[playername]' with a players name, and '[group]' with a group name.
ModifyWorld is a plugin which comes included with PermissionsEx, and provides a number of different permissions which control the way your users behave on your server, for example whether they can speak, use Minecarts/Boats, or even use beds.All of these nodes can be given in the same way any other node can, be it global, per-world, or per-user.
The use of negative nodes are not needed, if you do not want a group/user to be able to access a permission, simply do not define it.There is a file in the 'UsingPermissionsEx.zip' folder that lists all of the different permission nodes linked with Modifyworld, how to use them, and what they control.
PLEASE NOTE: You MUST give the relevant ModifyWorld permissions to your users, if you skip this step and do not give any of the nodes, your users will not be able to speak, or do anything.
Please remember to go into the config.txt for ModifyWorld, and set 'Enable' to true.
Please remember to go into the config.txt for ChatManager, and set 'Enable' to true.
ChatManager is a server chat plugin desinged for use with PermissionsEx, it allows your users/groups to have prefixes/suffixes assigned to their names, for example: [Server][Owner] Playername'.
I do not recommend running this alongside any other chat formatting plugin, as they could intefere with each other. I advise removing other chat plugins, such as HeroChat, iChat, etc, and just using ChatManager, as it works perfectly with PermissionsEx, and other plugins such as Factions that add a prefix.
Go to your /plugins/ChatManager directory, and open the 'config.yml'. Replace the text in that file with this set up i have created in advance, to give a result that will look like the example above:
global-message-format: <%prefix|%suffix%player> &e%message
message-format: <%prefix%suffix%player> %
Giving a group a prefix/suffix:
Go back to you /plugins/PermissionsEx, and open the 'permissions.yml' file again.
You will notice under each group name i have placed two sections named prefix, and suffix.Adding these prefixes and suffixes is incredibly easy, and can look however you like.
In the file, i have given an example under the Default group that looks like this:
prefix: '&6[&7Default&6] &f'
The '&6, &7, and &f' denote colours/colors.
So in actual fact, this prefix would be displayed as:
Since we have given a suffix of '&f', this means anything after the code will be displayed as white, meaning the PLAYERNAME and MESSAGE.
We can also use the suffix as an extra prefix, by typing something like this:
suffix: '&6[&7Default&6] &f'
Which will be displayed as:
And because we added '&f' the text after the suffix will be white, like the PLAYERNAME and MESSAGE.
This was just a quick, basic tutorial for those were confused by permissions, if i have confused you even more i apologise, and if i have missed something, or you run into errors, please comment on this blog, or send me a PM, and i will help you the best i can.
For a full list of commands/permissions, and more in-depth set-up guides relating to PermissionsEx, go to: http://forums.bukkit.org/threads/admn-dev-permissionsex-pex-v1-14-tomorrow-is-today-1240.18140/
|Tags:||Server, Bukkit, Plugins, Tutorial, BENNETTMAN, Permissionsex, Permissions|
|Credit:||t3hk0d3, Bukkit Logo Pixelart by: Eplemosen|
Update #5 - Reformatted! : 12/20/2011 1:41:17 pm12/20/11
I will be updating this tutorial for the latest version of PermissionsEx, with easier methods to achieve the things covered in this tutorial.
Also, we got over 10,000 views!
Update #4 : 12/09/2011 10:50:49 pm12/09/11
Use the tutorial I have provided in the link until I can fix this one.
Update #3 - Upcoming Updates : 12/09/2011 10:47:03 pm12/09/11
I will be updating the tutorial files to an easier to read/understand version.
The template files will also be updated to use the easier formatting that I use myself.
Update #2 - Version 1.16 : 11/09/2011 12:33:16 pm11/09/11
Update #1 - Recommended by t3hk0d3! : 10/06/2011 7:56:57 am10/06/11
Join us to post comments.