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!
Bukkit needs to get my pull request merged in. :(
Anyway, this is now fixed in b7+, but I recommend b12+.
ps: edited comment because I was having a temper tantrum and it was a bit explicit.
Also, when I attempt to do commands:'
2011-12-15 21:37:20 [SEVERE] null org.bukkit.command.CommandException: Unhandled exception executing command 'priv' in plugin Privileges v1.1.0-b2 at org.bukkit.command.PluginCommand.execute(PluginCommand.java:42) at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:165) at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:378) at net.minecraft.server.NetServerHandler.handleCommand(NetServerHandler.java:757) at net.minecraft.server.NetServerHandler.chat(NetServerHandler.java:722) at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:715) at org.getspout.spout.SpoutNetServerHandler.a(SpoutNetServerHandler.java:180) at net.minecraft.server.Packet3Chat.a(Packet3Chat.java:33) at net.minecraft.server.NetworkManager.b(NetworkManager.java:226) at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:93) at org.getspout.spout.SpoutNetServerHandler.a(SpoutNetServerHandler.java:550) at net.minecraft.server.NetworkListenThread.a(SourceFile:108) at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:527) at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:425) at net.minecraft.server.ThreadServerApplication.run(SourceFile:457) Caused by: java.lang.NullPointerException at net.krinsoft.privileges.PermissionManager.calculateGroupWorldPermissions(PermissionManager.java:145) at net.krinsoft.privileges.PermissionManager.calculateGroupPermissions(PermissionManager.java:140) at net.krinsoft.privileges.PermissionManager.registerPlayer(PermissionManager.java:59) at net.krinsoft.privileges.PermissionManager.reload(PermissionManager.java:29) at net.krinsoft.privileges.PermissionManager.<init>(PermissionManager.java:24) at net.krinsoft.privileges.Privileges.registerPermissions(Privileges.java:95) at net.krinsoft.privileges.commands.ReloadCommand.runCommand(ReloadCommand.java:31) at com.pneumaticraft.commandhandler.CommandHandler.checkAndRunCommand(CommandHandler.java:251) at com.pneumaticraft.commandhandler.CommandHandler.processFoundCommands(CommandHandler.java:115) at com.pneumaticraft.commandhandler.CommandHandler.locateAndRunCommand(CommandHandler.java:70) at net.krinsoft.privileges.Privileges.onCommand(Privileges.java:72) at org.bukkit.command.PluginCommand.execute(PluginCommand.java:40) ... 14 more
Yeah, I'm getting the following error on player join:
2011-12-15 21:35:48 [SEVERE] Could not pass event PLAYER_JOIN to Privileges java.lang.NullPointerException at net.krinsoft.privileges.PermissionManager.calculateGroupWorldPermissions(PermissionManager.java:145) at net.krinsoft.privileges.PermissionManager.calculateGroupPermissions(PermissionManager.java:140) at net.krinsoft.privileges.PermissionManager.registerPlayer(PermissionManager.java:59) at net.krinsoft.privileges.PlayerListener.onPlayerJoin(PlayerListener.java:24) at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:265) at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:58) at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:339) at net.minecraft.server.ServerConfigurationManager.c(ServerConfigurationManager.java:129) at net.minecraft.server.NetLoginHandler.b(NetLoginHandler.java:113) at net.minecraft.server.NetLoginHandler.a(NetLoginHandler.java:39) at net.minecraft.server.NetworkListenThread.a(SourceFile:94) at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:527) at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:425) at net.minecraft.server.ThreadServerApplication.run(SourceFile:457)
Right, so none of the permissions work... Nobody can build or anything.
Is there something wrong with my config? http://pastebin.com/rmhsRpRX
what i ment by prefixes is it needs to have the [rank] in front of the username thats all it doesnt meant the whole thing just the user's prefix (makes it way easier to control ranks)
bindmind - Updated the main post, which now includes all of the permissions and commands as of the time of this posting. And to the complexity of the commands... fear not! Most of the commands have multiple aliases (eventually getting down to 2-4 letter commands) that shorten them up. /priv group perm set -> /pgps, for example. The shortened versions of each command are in the permissions section.
akusnierek - 1) I have no intention of adding chat plugin functionality to this plugin. It is a permissions manager, not a chat manager. 2) Already done. See plugin description. 3) I won't. 4) If another plugin wants to use an economy system to propagate changes to groups, they're more than welcome to hook this plugin or issue server commands to get it done. I won't stop them.
5) Ops can create groups, they just can't modify their own (or any group with a higher rank). This is to prevent abuse/overpromoting. There is no definite way to abuse this, (even giving someone the power to set groups or add permissions, since they can't set/modify their own group with it), but there are technically some loopholes which I won't discuss (so as to prevent spreading the possibility of abuse). :)
Good times.
Question. What are the nodes for the commands? I'd like to be able to promote/demote people in-game =S
ohh and make it possible so ops can make groups!!!!!! please
i love the plugin it just needs a few things: 1.it needs to support colors so you can put ex. &1in front of the name of the group when you create one 2.make a node adding command please like /priv group node [node] 3.do NOT add prefixes though only make it possible to put color codes in the group names! 4. support economy systems like make people pay for the ranks ex. /priv pay [group name]
THANKYOU!
This is EXACTLY what I've been looking for! I don't understand why all the other permissions plugins have a boner for multigroups, but I'm thanking the heavens for this singlegroup plugin!
Thankyou!
@joshcvb - My plugin requires no interaction on the part of devs, but as for "making it stand out", I just haven't documented the differences.
When my plugin finds a group change (either through a command issued by a player, or a plugin using the API to change a player's group), it throws a GroupChangeEvent to notify anyone else that might be listening of a group change.
Only one group per player is supported, which I feel eliminates the massive amount of ambiguity regarding groups in previous permissions iterations.
I'm happy to entertain any questions you may have and, even better, implement feature suggestions. Just post a topic in my forum!
@ShadowSin240 - Commands are started by a top level '/priv'. I'm currently working on the commands, and because of that I have not yet documented them (since they are likely to change in the interim).
I'll update the description with the current command implementation.
What are the commands????
How does your plugin standout from any other perms system? As a dev I don't like supporting multiple perm systems bc it becomes a hassle. I guess what makes yours the best to use over the other few that are out?
<<reply 379219="">>
It does indeed! It's still in beta, but you're welcome to try it. I've been working on it slowly (in addition to my other projects), but it's quite stable and currently offers a PermissionsBukkit importer if you want to convert.
It uses the more traditional list-style permissions configuration, so it should be more familiar to people converting from Permissions 2.x/3.x.
If you do try it, be sure to let me know how it goes! Unfortunately, I haven't yet added all of the commands applicable to changing users/etc, so you'll have to edit the groups.yml and users.yml by hand.
Dose this support bukkitpermissions?