Jump to content

  • Curse Sites
Become a Premium Member! Help
Latest News Article

Setting Up PermissionsBukkit [TUTORIAL]


  • This topic is locked This topic is locked
10 replies to this topic

#1

Catatonic27
  • Location: USA
  • Minecraft: Catatonic27

Posted 21 June 2012 - 02:50 PM

This is just gonna be a basic walk though on how to setup a permissions file for PermissionsBukkit. I can't promise that your configuration is going to fit into one of these categories, but perhaps you'll at least learn enough about how it works to set up your own.

I'm going to cover three fairly basic and fairly popular setups:
The Ranks System. This is the timeless system where a user starts out as a basic user or builder and works his way up a hierarchy of groups to get more permissions. Great for maps where you focus on building, and you want the noobies to prove themselves before you give them creative mode or something

The Teams Setup. This is another popular setup where you have multiple groups that you want to be essentially the same [i.e: They would have the same permissions or almost the same permissions] Good for working with plugins that checks your permissions group for something like chat colour or a plugin that allows/denies access to an area based on your group etc...

The Mods Setup. This setup can really be used in conjunction with any of the other two, and it's very simple.

Now if you're a seasoned permissions pro and you're rolling your eyes right now, just remember that this is geared toward the guy who has little or no setup experience with PermissionsBukkit.

When you download and install the plugin for the first time, it generates a file called 'config.yml'. Now this is where all the magic is going to happen. When you open the file for the first time you'll notice that a bunch of stuff is already typed in here. This is the default configuration and it serves to show you what this file is supposed to look like.

users:
	ConspiracyWizard:
		permissions:
			permissions.example: true
		groups:
		- admin
groups:
	default:
		permissions:
			permissions.build: false
	admin:
		permissions:
			permissions.*: true
		inheritance:
		- user
	user:
		permissions:
			permissions.build: true
		worlds:
			creative:
				coolplugin.item: true
		inheritance:
		- default

Now don't get intimidated yet, this might look a wee bit confsing at first, but in a few minutes this is going to look like a well oiled machine.

If you'll look at the way this hiarachy is set up, you'll see that the main groups in this file are 'users' and 'groups', and these groupings have little subgroupings attached to them and so on.

We'll take a look at the 'users' section first.

users:
	<username>:
		permissions:
			permissions.example: true
		groups:
		- admin

You probably noticed that I replaced 'ConspiracyWizard' with '<username>'. That's just because all 'ConspiracyWizard' was, was an example username. And this is just less confusing.

So what is this telling us? Well it's listing a user, and it's saying what permissions this user has, and what group he/she's in.

users:
	Catatonic27:
		permissions:
			bukkit.commands.op: true
			essentials.jump: true
			essentials.setspawn: false
		groups:
		- n00b

Now what have I done? I put my username in here, gave myself some 'real' permission nodes and assigned myself to a group [n00b]. If you don't know what permission nodes are, they're essentially little chunks of permissions that different plugins will give you. If I have a plugin that lets people change their usernames and give themselves nicknames, then it might have two different permission 'chunks'. nicknameplugin.setnickname, and nicknameplugin.setnickname.others. If I only have the first node and not the second, then I'll only be able to set my own nickname and not anyone else's. It's just a way of keeping track of who is allowed to do what, with which plugins.

And I can add as many users to this list as I want as long as I follow the same spacing hierarchy.

users:
	Catatonic27:
		permissions:
			bukkit.commands.op: true
			essentials.jump: true
			essentials.setspawn: false
		groups:
		- n00b
	Boxxy:
	 permissions:
			bukkit.commands.ban: true
			essentials.heal.others: true
		groups:
		- BossN00bz
	Dwaffle:
	 permissions:
			nicknameplugin.setnickname.other: true
		groups:
		- n00b

Now unless you're weird and like to do a lot more work than you have to, you'll rarely use the 'permissions' line of the 'users' section to setup your permissions. Because usually a player's permissions are defined by their group.

groups:
	default:
		permissions:
			permissions.build: false
	admin:
		permissions:
			permissions.*: true
		inheritance:
		- user
	user:
		permissions:
			permissions.build: true
		worlds:
			creative:
				coolplugin.item: true
		inheritance:
		- default

You'll observe that the way this section is set up isn't so different from the 'users' section. There are three groups added here already for us, 'default', 'admin', and 'user'. The only thing worth mentioning about that is that the 'default' group is always the one a player is put into when they first join by...Well by default. So I try to avoid changing the name of this group just in case it messes with that functionality at all.

groups:
	default:
		permissions:
			permissions.build: false
	n00b:
		permissions:
			permissions.*: true
		inheritance:
		- user
	BossN00bz:
		permissions:
			permissions.build: true
		worlds:
			creative:
				coolplugin.item: true
		inheritance:
		- default

So I added some group names to this list. You'll see that under each group it lists 'permissions' and 'inheritance'. It also lists one called 'worlds' in one of the groups [and we can add that line to the 'n00b' group if we wanted to] and I'll talk more about that later.

groups:
	default:
		permissions:
			permissions.build: false
	n00b:
		permissions:
			permissions.build: true
			essentials.smite: true
		inheritance:
		- default
	BossN00bz:
		permissions:
		bukkit.command.gamemode: true
		inheritance:
		- n00b

Now I've added some permissions to these groups and set their inheritance. So the group 'n00b' inherits all the same permissions from group 'default' [which isn't much] PLUS the permissions I specifically gave them and the group 'BossN00bz' gets all the same permissions as 'n00b' PLUS all the permissions I specifically gave them.

So now Catatonic27 can build, and smite people since he's in permissions group 'n00b' but he can't change his gamemode because his group doesn't have permission to do that. However, since Boxxy is in group 'BossN00bz' she can build, smite AND change her gamemode. You see, group 'BossN00bz' is better than 'n00b' because they get all the same permissions PLUS an extra one.

groups:
	default:
		permissions:
			permissions.build: false
	n00b:
		permissions:
			permissions.build: true
			essentials.smite: true
		inheritance:
		- default
	BossN00bz:
		permissions:
			bukkit.command.gamemode: true
		inheritance:
		- n00b
	GodN00bz
		permissions:
			essentials.god:true
		worlds:
			world_nether:
				essentials.fireball: true
		inheritance:
		- BossN00bz

And we can add as many more groups as we want just like users. I also added a 'world' line to our new group that makes it so that whenever a user that is in this group enters 'world_nether' they get the permission to shoot fireballs that they would not have anywhere else.

Now I said I'd show you how to do a few different kinds of setups. And I already kind of showed you how to so a Ranks System by using the 'inheritance' function. A Teams System is pretty easy.

groups:
	default:
		permissions:
			permissions.build: false
	RedTeam:
		permissions:
			permissions.build: true
			essentials.suicide: true
			essentials.home: true
			stargate.use: true
			essentials.msg: true
		inheritance:
		- default
	BlueTeam:
		permissions:
		inheritance:
		- RedTeam

You see I left BlueTeam's permissions line blank because they inherited all the same perms as RedTeam. So these two groups are functionally the same. Except now I can use a chat colour plugin to set the colour for group 'RedTeam' to RED, and the colour for group 'BlueTeam' to BLUE.

"Duuude - You know what would be awesome? If like, the two different teams had like different special abilities and powers and stuff..."

Well that's easy enough to do:

groups:
	default:
		permissions:
			permissions.build: false
	RedTeam:
		permissions:
			permissions.build: true
			essentials.suicide: true
			essentials.home: true
			stargate.use: true
			essentials.msg: true
			essentials.fly: true
		inheritance:
		- default
	BlueTeam:
		permissions:
			essentials.fly: false
			essentials.smite: true
		inheritance:
		- RedTeam

So I added the permission to fly for RedTeam, but specifically denied to for BlueTeam. I then gave BlueTeam the smite permission. I didn't change the inheritance at all, just gave/denied a few permissions nodes.

Now as for the Mods System, it's not anything we haven't already gone over. It's just that in some cases, you don't want a moderator to be OP [that is, have ALL permissions] But you still want them to have ALL the essentials commands/permissions but don't feel like writing them all out.

groups:
	mod:
		permissions:
			essentials.*: true
			essentials.back: false
		inheritance:
		- RedTeam

So what did here was give the 'mod' group a .* node. And what that is, is a node that gives access to every permission for said plugin. essentials.* means he can do anything that essentials lets him. I even went in and denied him one command that I didn't want him to have. That's a LOT easier than typing every node out, setting it to : true and then setting that one node to : false.

I hope I was able to help you budding server admins out, and if you have any other questions, feel free to PM me.

May the force be with you all.
As always my children, stay away from drugs, open flame, and normal people. They will all ruin your life.

Register or log in to remove.

#2

webrosc
    webrosc

    Kitty Moderator

  • Sectional Moderator
  • 8102 posts
  • Location: South West England
  • Minecraft: webrosc

Posted 21 June 2012 - 03:20 PM

very very nicely laid out, looks pretty good (only skim read it though)
might be an idea to add how important spacing is to yml files, and that tabs are a BIG no no.
I would also recommend that notepad++ is used to edit/create the file and not the basic notepad

#3

Catatonic27
  • Location: USA
  • Minecraft: Catatonic27

Posted 21 June 2012 - 03:24 PM

Thanks! I kind of made this tutorial with the assumption that the recipient understood how to edit YAML, but you make a good point. someone who doesn't know a lot about permissions could very likely not be good with .yml files either.

And yes, if you're not using Notepad ++...Just don't even bother.
As always my children, stay away from drugs, open flame, and normal people. They will all ruin your life.

#4

Flapman
    Flapman

    Zombie Killer

  • Members
  • 190 posts

Posted 23 June 2012 - 06:21 PM

Is there any way to change the name of the default group? I want my default group to be named "Player", because default looks really ugly with iChat.

#5

Catatonic27
  • Location: USA
  • Minecraft: Catatonic27

Posted 24 June 2012 - 02:18 AM

View PostFlapman, on 23 June 2012 - 06:21 PM, said:

Is there any way to change the name of the default group? I want my default group to be named "Player", because default looks really ugly with iChat.

You know, now that I think about it, you probably could. As long as you don't give it an 'inheritance' line I'm pretty sure sure you could make it anything you want. Silly me.
As always my children, stay away from drugs, open flame, and normal people. They will all ruin your life.

#6

IITheHistorianII
  • Location: Panama City Beach, FL
  • Minecraft: IITheHistorianII

Posted 25 June 2012 - 08:58 PM

We have working perms but no one (MEMBERS& GUESTS) can build even in unprotected land.

Here are the perms:


groups:


  Guest:
default: true
permissions:
- essentials.afk
- essentials.motd
- essentials.spawn
- essentials.tpaccept
- essentials.help
- essentials.helpop
- essentials.rules
- mobarena.use.join
- mobarena.use.leave
- mobarena.use.spectate
- mobarena.use.arenalist
- mobarena.use.playerlist
- quarantine.play
- chestlock.free
- scsigns.use
- simplespleef.start
- supplysign.access
- multiverse.access.*
- multiverse.portal.access.*


inheritance: []
info:
  prefix: '&e[Guest]&f'
  build: false
  suffix: ''

NOTE: All other ranks inherit.
Posted Image[/url] [SSSS]

#7

Catatonic27
  • Location: USA
  • Minecraft: Catatonic27

Posted 27 June 2012 - 12:40 PM

View PostIITheHistorianII, on 25 June 2012 - 08:58 PM, said:

We have working perms but no one (MEMBERS& GUESTS) can build even in unprotected land.

Here are the perms:


groups:


  Guest:
default: true
permissions:
- essentials.afk
- essentials.motd
- essentials.spawn
- essentials.tpaccept
- essentials.help
- essentials.helpop
- essentials.rules
- mobarena.use.join
- mobarena.use.leave
- mobarena.use.spectate
- mobarena.use.arenalist
- mobarena.use.playerlist
- quarantine.play
- chestlock.free
- scsigns.use
- simplespleef.start
- supplysign.access
- multiverse.access.*
- multiverse.portal.access.*


inheritance: []
info:
  prefix: '&e[Guest]&f'
  build: false
  suffix: ''

NOTE: All other ranks inherit.

I didn't really want to turn this thread into an "OMG my perms dont work please fix them for me" page, but since I'm already here replying to you, I might as well point out a few things:

- This is not PermissionsBukkit
- This thread is called "Setting Up PermissionsBukkit [TUTORIAL]"
- I did not claim to be an expert in PEX, GroupManager, or whatever it is you are using.
- I know that when using PermissionsBukkit, there is a 'permissions.build' node [which you do no have listed] that needs to be set to true in order to be allowed to build. I do not know if this is the case here, but it's work a shot.

Another thing I noticed:

View PostIITheHistorianII, on 25 June 2012 - 08:58 PM, said:


inheritance: []
info:
  prefix: '&e[Guest]&f'
  build: false
  suffix: ''

NOTE: All other ranks inherit.

"build: false" on the second line from the bottom. That seems like kind of an obvious thing to consider.
As always my children, stay away from drugs, open flame, and normal people. They will all ruin your life.

#8

Zeus043
    Zeus043

    Tree Puncher

  • Members
  • 19 posts

Posted 15 November 2012 - 03:33 AM

file:///Users/kristopherneumaier/Desktop/Screen%20shot%202012-11-14%20at%209.14.20%20PM.png
My Permissionsbukkit has the same format but my Permissions still don't work. Here are MY Perms. Soliders Are guests, Heroes are members, Demigods are Donors, Minorgods are Moderators, and Gods are Admins Please help!


users:
ConspiracyWizard:
permissions:
permissions.*: true
groups:
- admin

etock:
permissions:
   commandbook.spawn: true
groups:
- Solider

LegendMayne:
permissions:
   commandbook.spawn: true
groups:
- Solider

Fabian_2k9:
permissions:
   commandbook.spawn: true
groups:
- God

firelord043:
permissions:
   commandbook.spawn: true
groups:
- MinorGod

groups:
Solider:
permissions:
permissions.build: true
commandbook.spawn: true
commandbook.kit.starter: true
commandbook.return: true
iConomy.money: true
iConomy.pay: true
commandbook.warp: true
permissions.destroy: true
bukkit.command.help: true
commandbook.home.set: true
commandbook.home.teleport: true
commandbook.call: true
commandbook.away: true

God:
permissions:
permissions.*: true
   permissions.all: true
inheritance:
- MinorGod

Hero:
permissions:
factions.kit.fullplayer: true
factions.money.*: true
   commandbook.return: true
   commandbook.msg: true
inheritance:
- Solider

Demigod:
permissions:
   commandbook.warp.teleport: true
commandbook.heal.other: true
commandbook.heal: true
inheritance:
-Hero
-Solider


MinorGod:
permissions:
   commandbook.bans.ban: true
   commandbook.kick: true
   commandbook.warp.set: true
   commandbook.bans.unban: true
inheritance:
-Demigod
-Hero
-Solider

file:///Users/kristopherneumaier/Desktop/Screen%20shot%202012-11-14%20at%209.14.20%20PM.png

#9

Doty1154_
  • Minecraft: Doty1154_

Posted 06 January 2013 - 11:23 PM

I want to move people to different groups how do i do that, with-in the console/as a op/owner.

Help is greatly appreciated.

#10

Catatonic27
  • Location: USA
  • Minecraft: Catatonic27

Posted 07 January 2013 - 03:32 AM

If you use /permissions group, it should give you a list of group-related commands. But I think the one you want is /permissions player addgroup <player> <group> or similarly; /permissions player removegroup <player> <group>

You can do quite a lot with PermisisonsBukkit from the console or in-game. I recommend that you give this page a read.

Hope that helped, thanks!
As always my children, stay away from drugs, open flame, and normal people. They will all ruin your life.

#11

AliStarr
    AliStarr

    Retired Staff

  • Retired Staff
  • 4280 posts
  • Location: Adelaide, South Australia
  • Minecraft: AliStarr
  • Xbox:WalkIngD1sasT3R

Posted 07 January 2013 - 05:47 AM

We already have a thread dedicated to helping users with Permissions problems here.

Locked.

Posted Image


Please quote me to get my attention in a thread.

Please read the forum global rules, server section rules and Bumping rules before posting.