Privileges
Privileges
Privileges seeks to be a familiar face for Permissions, and uses the Permissions 2.x format of lists of nodes for users. It offers inheritance, multi-world permissions, and promotion tracks.
This plugin is designed to implement Super perms (Bukkit Permissions). It does not provide an extensible API for permissions handler hooking, except in the form of getGroup().
by krinsdeath
Pages
- Configuration / groups.yml
- Configuration / config.yml
- Example Setup
- Commands
- Jenkins / Github 5.1. Use of the plugin builds from Jenkins is unofficial, unsupported and unapproved by BukkitDev Staff!
Features
- Multi-world compatible permissions management, with a familiar interface.
- Easy-to-use, powerful, and accurate inheritance.
- Promotion ladders and tracks through group ranks.
- Anti-build with permissions nodes
privileges.build
andprivileges.interact
. - Expanded anti-build permissions with
privileges.interact.[block id]
, to prevent interaction on a block-by-block basis. - Extremely powerful command system!
- Incredibly light-weight registration of players. Thousands of nodes can be applied in only a few millionths of a second.
- Plugin Metrics! Privileges reports the total number of groups and users registered in its config files to mcstats.org. This data is 100% anonymous and is only used for informational purposes. You can disable this in config.yml by changing
plugin.metrics: false
Commands
- /priv - Top level command. Does nothing.
- /priv check [player] [node] - Checks the specified node for the specified player. If player is omitted, checks your own nodes.
- /priv list [player] [page] - Lists the specified player's permissions nodes. If player is omitted, lists your own nodes. 7 nodes are listed per page.
- /priv reload - Saves Privileges' currently loaded configuration to disk and reloads all files.
- /priv save - Saves Privileges' currently loaded configuration to disk.
- /priv load - Unloads current configurations and loads from the disk - used to pick up external file changes.
- /priv backup [name] - Creates a configuration snapshot including users and groups, and saves it to a directory: privbackup/[name].
- /priv restore [name] - Restores the specified configuration snapshot.
- /priv version - Shows Privileges' current version and build numbers.
- /priv group [option] - Top level 'group' command
- * /priv group create [name] [rank] - Creates a group with the specified name and rank. If your current rank is equal to or lower than the rank you specify, the command will fail.
- * /priv group remove [name] [--safe] - Removes the specified group. If your rank is lower than the target group's rank, the command fails. If --safe is specified, the command will attempt to remove all references to the group from all users (and set them to your default group), and remove the group from all inheritance references as well.
- * /priv group set [player] [group] - Attempts to set the specified player's group to the specified group. If the target group's rank is equal to or higher than the command sender's rank, the command fails.
- * /priv group show [player] - Shows the sender the specified player's group.
- * /priv group list - Lists the available groups and their ranks.
- * /priv group perm - Top level 'group permission' command
- * * /priv group perm set [group] [node] [true|false] - Attempts to set the specified node to the specified value for the specified group. Fails if you don't have a higher rank setting than the target group.
- * * /priv group perm remove [group] [node] - Attempts to remove the node specified from the group. Fails if your rank is not higher than the target group.
- /priv user perm [option] - Top level 'user permission' command
- * /priv user perm remove [player] [node] - Removes the node specified from the target player.
- * /priv user perm set [player] [node] [true|false] - Sets the specified node to the value for the target player.
- * /priv user reset [player] - Resets the specified user to the default group and erases any individual permissions.
more commands will be added as I think of them
Permissions
- privileges.interact (defaults true) - Allows the player to interact with objects like buttons and switches
- privileges.build (defaults true) - Allows the player to break/place blocks
- Base commands
- * privileges.reload - /priv reload
- * privileges.save - /priv save
- * privileges.load - /priv load
- * privileges.backup - /priv backup [name]
- * privileges.restore - /priv restore [name]
- * privileges.version - /priv version
- * privileges.debug - /priv debug
- Administrative
- * privileges.promote - /promote [player]
- * privileges.demote - /demote [player]
- * privileges.check - /pc [player] [node]
- * privileges.list - /priv list [player] [page]
- * privileges.info - /priv info [player]
- Group base commands
- * privileges.group.create - /pgc [group] [rank]
- * privileges.group.remove - /pgr [group] [--safe]
- * privileges.group.set - /pgs [player] [group]
- * privileges.group.show - /pg show [player]
- * privileges.group.list - /pg list
- Group permissions commands
- * privileges.group.perm.set - /pgps [group] [node] [true|false]
- * privileges.group.perm.remove - /pgpr [group] [node]
- User permissions commands
- * privileges.user.perm.remove - /pupr [player] [node]
- * privileges.user.perm.set - /pups [player] [node] [true|false]
- * privileges.user.reset - /pur [player]
Special thanks
- gravypod - Small performance tweaks and optimizations. Thanks a bunch!
- Wolvereness - Massive improvement to node registration performance through templating. Keep on keepin' on!
I've been 3-4 hours configuring privileges and converting our user files.
I've converted them and everything seems to be good for users logging in/etc.
However, when I issue the command in-game, this is what happens...
"/priv group set gabizou mod"
The entire server HALTS for 5-10 seconds
Then it gives me the msg
gabizou's group has been set to mod
It seems like this permission system cannot handle having over 100k users in one file. (Note the file is around 5MB large)
Any fixes available?
@Absolutionmc
Easy... just issue a setgroup command when the perk expires ... this is handled all through buycraft!
Hope you can add multi groups per user feature. That's the only thing keeping me from moving to privileges :(
The main problem i'm having is basically 2 normal ranks and 1 donator rank for 30 days.
- New
- Member
- Donator
If a member donates and is promoted to donator, how can I demote him (using buy craft) back to member without demoting him. If I demote, how would I know that person was a member before or a New player? With multi groups, a player would keep his Member/New rank and the donator rank would be added. So after 30 days I can remove the donator rank and the player would go back to the rank he had.
/priv list only lists a users permissions, is it possible to list a groups permissions? There are times when I want to see what permissions a group have, but as of now I have to open the file with a text editor (view (vim)) to see that. I would like to be able to run /priv list [group] to see what perms a group has, so I then can see if I need to add or delete a node.
I do not think there is a way. If there is a way, how would I do it? If there isn't, would you add such a feature?
Thanks!
@Krisndeath - it also appears that there is lag on group changes using the command...
it took on average 3-4 seconds to change Kainzo's group to founder from console. This was more or less just from console, cant say 100% if the lag is in game just yet but wanted to report it.
http://pastie.org/private/qhaolzbukpmjf5hw2hejw
@krinsdeath
So is it possible to have a user have multiple groups or whats the best way to handle that? we have some users who are STAFF (low level) and have HIGH-LEVEL donor status.
Let me know :)
Are you ever going to support MySQL as a way to save permissions?
LordKainzo: 70,000 users shouldn't be any kind of problem. And I don't know what transient permissions are supposed to be, so no, it does not.
@krinsdeath
Howdy, I'm contemplating swapping from bPerms to Privileges ... we have around 70,000 users in our flatfile, what kind of support does Privileges have for that large of data?
Does it support transient permissions? :)
Afotai: There is no need. The last time the player logged into the server is recorded in their player.dat file. Privileges uses that - it doesn't persist any data on its own.
@krinsdeath
Interesting, but how does it know which users haven't logged in the last 30 days? If you set it to true, Privileges also starts putting timestamps for each user in the users.yml?
Afotai: If it's true, Privileges will clear out users that have been offline for more than 30 days who are still in the default group from the users.yml file.
@krinsdeath
What is the use of users_cleanup in the config.yml?
bradgillap: My own chat plugin ChatSuite will do precisely what you want, and SimplePrefix has a similar setup (although I don't think it's as powerful).
greatman321: I have no intention of adding prefix support directly to Privileges - it's a permissions plugin, and I am not going to bloat it up with superfluous stuff that is handled (quite easily) by other plugins. With that said, I'm happy to (possibly) implement a more generic solution, however I'd have to see an actual use case that doesn't include the term "that's how other permissions systems do it."
I don't mean to sound harsh.
Hey!
Just to say I implemented prefix support (Did the Vault hook too) & made player nodes save on my local copy : https://github.com/greatman/Privileges
Tomorrow ill modify it to a fully featured metadata system (Kinda like in bPerms)
Started using your plugin today and I love it! It's insanely fast!
I'm a recent pex convert just setting this up on my dev server and I need something to handle colour in groups still. I was looking at the colorme plugin but they don't seem to support privileges I think. They all use an info key in the permissions.yml file with a prefix and suffix. They have a built in group management but that's more complicated than what I'm after. Is there a colour plugin or chat plugin that allows me to assign like
- colorplugin.groupuser
- colorplugin.groupmod
- colorplugin.groupadmin
That way I could just assign a permission node to each group for their tags and colours. Sorry this is a little unrelated to your plugin but I thought you might have some advice. I'm digging the speed. I thought going to a flatfile permission system would be slower but MD5 over at spigot sent me this way and as always he was right. This is the fastest permissions system I have ever used.
Absolutionmc: This plugin only provides a way for a user to be a member of a single group. I'm working slowly on a refactor that will allow multi-group support (begrudgingly, as I hate the idea of multiple groups per user!), but there is currently no easy way to do it.
An alternative way to provide features like that is with the permissions.yml and custom node templates. Create a node in your permissions.yml, assign it some children (the perks of being a vip), and then assign that node when you get money instead of assigning a new group.
Is there a way for a player to belong to 2 groups at the same time?
For example a staff member that wants to be a donor. So he can be both
DavMicrofix: There is no reason that this plugin will not work on 1.5. It should be fine.
is it 1.5 ready ?