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!
@krinsdeath
Will you expand the API? I would like to request playerAddGroup() either via Vault or natively.
@krinsdeath:
did the switch on my server today :D
you should really turn on metric by default, so that more ppl can see that its being used, other plugins just mention that it is on by default and that you can set it to false if you dont like it.
Also, if i wanted to suggest a feature, you want me to use the ticket system? or just post here?
Cheers
sirmyllox
and again .. tnx for your great work :D
@Thatotherjanitor
+1 :D
@krinsdeath
Thanks. By the way, I LOVE your plugin :D
Thatotherjanitor: The latest build on my Jenkins is already compatible with the latest builds of CraftBukkit. I will not be releasing a beta/official release until the Bukkit API is stabilized for 1.4.5/1.4.6/1.5 with the ItemMeta additions.
Until then my jenkins will have to suffice.
Are you guys going to update for 1.4.5?
@ krinsdeath
Update: I dont know what the below is all about, but i tested #144 with Vault #274, Group promotion works on my dev server now :)
cheers sirmyllox
Thank you for bringing this to my attention. It's now fixed as of my latest commit.
@krinsdeath
Ok! I found what caused this problem from my previous post. I had group: Test, and when I set this group in config.yml and group.yml the error was appearing then I changed group name to test - with lowercase letter, and everything works. Result: lower/upper case letter caused problem. Sorry for my bad English
gepardo43: That means you've got disconnect somewhere between your default_group in config.yml and your groups.yml. It's not a bug in this plugin. The error message is custom, meaning I anticipated it.
@krinsdeath
We are sorry for wasting your time :). Next one from yesterday:
Error:
Caused by: java.lang.NoSuchMethodError: net.krinsoft.privileges.groups.GroupManager.setGroup(Ljava/lang/String;Ljava/lang/String;)V
Method in question: Line 289 of GroupManager.java
This is the method it is saying doesn't exist. That's why that error baffles me. :(
Edit: This should now be fixed as soon as Vault accepts my pull request. The method return signature isn't listed in the error message, but that's what changed. This was 100% my fault (I changed the signature without thinking about depending plugins), so I'm sorry for the issues everyone!
@sirmyllox
Probably Privileges is not fully configured with Vault
@gepardo43
looks like the same error that i got, NoSuchMethodError. maybe something regarding the vault change that removed old methods?
oh and gepardo43, use pastebin :P
Next bug:
pure07: It is not possible with Privileges to do multiple groups per user. However, coupled with permissions.yml (Bukkit's own 'permissions manager') from the server root directory, you can create template nodes that assign multiple permissions at once. Following the creation of those template nodes, you can assign them to a user (via
/pups user template.node.name
) to grant them access to the children nodes from the template.sirmyllox: I can't tell you how grateful I am for the donation! As I said before, I'll have to do some more testing with Vault (I'll probably create a few test plugins to run through all the various features of Vault) to find that OnTime issue. The most likely problem is just some oversight that I can't see, since I don't actually use Vault.
@krinsdeath
Well, i really like Privileges, so im more than happy to do the testing. I will change the rewards of OnTime to perform a command instead of triggering a Group change .. so back to testing :)
oh, btw, it wasnt much, but i sent you a few bucks ..
Cheers sirmyllox
Great plugin, easy to setup and no issues so far. Is it possible to add a player to more than one group? for example player1 is in the permission group user and also in the permission group mobarena. I find it easier to just create a group of permissions and add certain players to it then to go and add each permission separately to the player
@krinsdeath
Ah thanks for the info, completely skipped over your jenkins.
pure07: Latest dev builds of Privileges don't use CraftBukkit at all (no more reflection, yay!) so updating to one of them (via my Jenkins) will solve that problem.