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!
Does this plugin support '*' ?
@SonarBeserk Permissions per world is included but getting this to works seems to be tricky..
Using /priv group perm will show the help screen
Ex.: members of group test (on world bleeding) should be able to switch their gamemode as they like..
The following line should have worked - but did not.
/pgps test bleeding:bukkit.command.gamemode true
[INFO] Invalid node string.
So have a look at the example group-configuration to get a clue how to put those per world nodes into the group.yml file.
But be careful and make a backup of those file..
will we ever get commands to set a perm by world? or if it is implemented, can we get documentation?
@krinsdeath
I've just tested that build - it works! Great :)
Thank you very much for spending your time for us. But now hurry and keep some time for yourself! ;)
Merry Christmas!
(and when your are back from vacations) same issue with:
pupr DHLF bukkit.command.stop ([INFO] I don't know about that user.)
For people who are new to your PI it would be more clear if those info includes
the unknown "user" like ->[INFO] I don't know about user "DHLF".
This way it may show what has been typed wrong in the command.
Until this get fixed too I have to edit those /plugins/Privileges/user.yml by hand and then use priv load.
Another confusing thing in the help for /priv user (set).
I suggest to change it to /pu perm set [user] [world:]node [true|false]
A very big help is the list command which shows all used nodes! Never again searching through all PIs to find the node ;)
DHLF: Thank you for bringing that to my attention. It's now fixed in my latest commit, and you can download the fixed version on my jenkins. Happy holidays!
Maybe I am to blind to see, but this happens if I try the following using the console:
priv user perm set DHLF bukkit.command.stop false
[INFO] I don't know about that user.
Resetting the "unknown" user works: priv user reset DHLF
[INFO] The user 'DHLF' has been reset to default.
Using CraftBukkit Beta 1.4.6#2561 + Privileges 1.7.3-b146
The idea is to keep myself from stopping the server. The usernames in users.yml are all lower case letters. Must I put the node into the users.yml by hand?
@krinsdeath
Hmm "pgs nick group" command doesnt work via commandblocks. Is it possible to set that?
Thank you
EDawg878: What is the console output? If you turn debug in Privileges on?
I do not use Vault and I don't use any plugins that use Vault.
@krinsdeath
The groupAdd() and groupRemove() in your Vault pull request works, but the playerAdd() and playerRemove() functions still do nothing.
What node do I give a group if I don't want them to use the "/plugins" command? (the "/plugins" command tells someone what plugins are on a server)
@krinsdeath
oki doki :)
ah, chatsuite it is then .. i'll take a closer look at it :)
sirmyllox: I will not be adding prefix/suffix to Privileges because it's a permissions plugin. It's intended only for permissions, not anything else.
ChatSuite, SimplePrefix, ColorMe and several other plugins work perfectly well and provide their own prefix/suffix information (regardless of Permission plugin).
@krinsdeath:
any chance you are planning on adding prefix/suffix?
sirmyllox
sirmyllox: privileges.build is "everything" - there is no privileges.build.* or privileges.build.id. If you want to deny access to place blocks/interact with stuff, it's privileges.interact.id or privileges.interact.blockname
@krinsdeath
Ok, just wondering as im using a copy of the permissions from the previous permission plugin that i had (with Changes to match Privileges ofcourse ). But nvm, i'll make the small Changes needed.
also, the antibuild feature .. is it as simple as giving "- -privileges.build.3" to prevent breaking of dirt blocks? do i need to give "- privileges.build.* " or is that given by default?
cheers sirmyllox
sirmyllox: After a brief look into the source code for Essentials, it will not be possible to override unless you explicitly set the previous permission to its opposite value in a higher ranked group.
So you'll have to add "essentials.tp" in Admin to override the "-essentials.tp" from Moderator.
Q:
My moderators Group have a set of global perms as well as worldspecific perms. My admin Group inherits th moderators Group perms, but only have global perms. It seems like the admin Group is inheriting the World specific perms from moderators thus rendering the globalpermission in admin Group not applicable.
Shouldnt a Group who inherit perms that has overriding perms in global perms "win" over the inherited World specific perms?
Quick Groups.yml below, my problem is that Admin who has all Essentials perms in global, are not allowed to tp in pvpworld:
my question is simply, is this how Privileges work? if it is, its just a matter of setting the perms the correct way, but i suspect that it shouldnt be like this.
grateful for any comment you have regarding this :)
SonarBeserk: I do not understand the question. You can already add nodes to specific worlds (see the groups.yml page for examples). Do you mean something else?
@krinsdeath
is it possible to add the ability to make parent nodes world based?
sirmyllox: My next build will include the metrics enabled by default.
EDawg878: I wrote a pull request to Vault that implements the
playerAddGroup()
andplayerRemoveGroup()
methods for Privileges. If you hook Privileges directly, you can do this by using theGroupManager.setGroup(String player, String group)
method.