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 cant wait to try this plugin :)
AmicusMCS: Privileges does not support that and I have no intention of adding metadata to groups.
Many plugins are made specifically to utilize PermissionsEx's custom option API.
For example, you can have:
Does Privileges support this? If not, can it? I cannot use a permissions plugin that does not have this support. This is the only feature I need.
slayr288: No. Privileges doesn't define nodes, it only attaches them. If * is supported it's on an individual-plugin basis.
@krinsdeath
Alright, so I won't have to worry about those timings? And another question, will the '*' all permissions node ever be supported?
slayr288: Privileges uses PlayerJoinEvent to create the permission object that it never has to touch again (except on world change). This means that the initial join of the player is the only thing that Privileges has any impact on, and even with thousands of permissions nodes that should not be a significant problem.
@krinsdeath
Ontime seems to have added a delay on plugin load, so that has fixed my issue. But, the timings of Privileges seems awfully odd, the 2nd worse timings out of my 56 plugins.
http:postimg.org/image/ai40tlq1r/
@Absolutionmc
done right you can make it work even smarter without needing multiple groups. use of parent nodes is smart.
Sorry to be annoying with it krinsdeath, I just wanted to know if there are any plans for the multiple groups per user. I just need that feature before moving from pex to privileges Thanks :)
LordKainzo: That issue is occurring because (somehow) the player is changing to a new world without having a group assigned (it should never return null for getGroup(), but it is). Is that occurring right at login, or just when the player teleports to a new world?
slayr288: The issue there is that OnTime might be trying to access groups before they are created. I'm not sure if there is any way to fix it aside from maybe getting the OnTime dev to delay his group check to a few ticks after the server starts fully.
LaserCucumber: group.[group name] nodes are there for convenience. Many plugins (my own ChatSuite, CommandBook/WorldGuard, LWC, etc) use group.groupname nodes for group checks, rather than hooking plugins like Vault. As far as the TNT cart thing, find the material name (Bukkit's javadocs will help with this) and give the group/user this permission:
-privileges.interact.tnt_cart
In the examples, I see groups having the permission node group.[groupname]. However, when my permissions file was imported from PermissionsBukkit (this is awesome by the way!), those permission nodes weren't added. So, are they required? What are they for?
Also, I'm trying to prevent the placement of TNT carts, but it doesn't seem to be possible.
Hey, there is an incompatibility with Privileges and OnTime. See this ticket for more info: https:github.com/MilkBowl/Vault/issues/401
Krinsdeath - thanks I'll attempt to add that in now to see if it improves performance.
We are one of the larger servers out there so if there is slow-downs, we'll see it almost immediately.
I saw this and wanted to report it - apologies for not making a ticket, I don't have the leisure of time.
http://pastie.org/private/fi9jcuaq54rlhzm77rap9a
Is there any plans to allow multiple groups on one target?
This isn't a help forum for other plugins.
jordan_the_baker: My own plugin ChatSuite, or any of the other chat plugins like SimplePrefix, ColorMe, mChat, etc. All of them should work perfectly well.
@krinsdeath
Ok thanks
Have any recommendations for a prefix plugin?
jordan_the_baker: You'll have to configure a chat plugin to give your players a prefix.
Does this have prefix support built in or do I have to manually give players a prefix?
LordKainzo: I've offloaded the saving of the users file to a separate thread, though I didn't want to do it (concurrency issues, of course). I've got a primitive block in there to prevent issues, though, so hopefully it works well enough. It seems fine from my testing. Latest dev build has it.
Yes Kainzo, the problem is how do I know which group to set after the donator rank expires? It could be set New or set Member. But I have no way to know which group it was.