GroupPermsLite
Unsatisfied with a number of other permissions management plugins publicly available, I sought to create a lighter and more elegant plugin to handle group-based permissions. With a focus to making all of the commands understandable at a glance and providing helpful details when queried. You should be able to get on with permissions management simply through typing /help GroupPermsLite and reading the command descriptions.
If you are unfamiliar with Bukkit permissions, please see the Wiki Article and the Forum FAQ
Features
- Simple and elegant
- Easy to use and understand
- Allows setting up an unlimited number of groups (names are case-insensitive)
- Has a default group called "all" that applies to all players that have joined the server, nomatter what other groups they are in
- Has a unique group for each player called "personal_[player name]" that allows individual permissions settings
- Saved in YAML format, advanced users can read and manage on disk and reload while the server is running using a command
- Simple and easy to use commands to add/remove players from groups and grant/revoke permissions from groups
- Allows use of the wildcard (*) to match any value for a node in a permission string when granting permissions using a command
- Allows adding negative permissions using the (-) operator to prevent a particular group from receiving the given permission from any other source
Ideas for future development
- /hasPermission ([player]) [permission node] - For manually checking permissions of a player and for use in command blocks (Available from 4.4 onwards)
- Tab auto-completion for registered permission nodes
- Support for Vault for better compatibility with plugins such as the LWC group feature
- A command to rename a player in order to support upcoming Mojang name changing feature
Commands
Command | Permission | Description |
---|---|---|
/GroupCreate [group] | group.admin | Creates a group without adding a player or permission |
/GroupAddPlayer [group] [player] | group.admin | Adds a player to the given group (creates the group if it doesn't already exist) |
/GroupRemovePlayer [group] [player] | group.admin | Removes a player from the given group |
/GroupGrantPerms [group] [(-)permission-string] | group.admin | Grants the given permission(s) to the specified group (creates the group if it doesn't already exist) |
/GroupRevokePerms [group] [permission-string] | group.admin | Revokes the given permission(s) from the specified group |
/GroupListPerms [group] ([page number]) | group.admin | Lists all of the permissions for a given group |
/GroupListPlayers [group] | group.admin | Lists all players in a given group |
/GroupList | group.admin | List all groups |
/GroupDelete [group] | group.admin | Deletes a given group |
/GroupReload | group.admin | Reloads config from disk |
/RegisterPerm [permission node] [default(op/not-op/true/false)] | group.admin | Manually register an unregistered permission node |
Most commands have a "silent" feature that is activated by placing a "-s" (without quotes) at the end. This is intended to be used with command blocks and command scripting plugins to allow you to manage your permissions through these without generating lots of console spam. You will still get a response if the command fails however.
Add-ons
- RankDisplayNames - Create ranks with chat prefixes that update automatically with permissions set through GroupPermsLite
Troubleshooting
It says the permission is not registered, what can I do?
Sometimes plugin developers will forget or simply not bother to register their permissions with Bukkit, but still use them in their code. Fortunately, the bukkit permissions.yml file can come to the rescue here. You should be able to find the permissions.yml file in the server directory. It is used by server owners to manually register additional permissions in bukkit. See http://wiki.bukkit.org/Permissions.yml
for details about editing the Permissions YAML. It is usually used to group permissions together so that they can all be assigned at once (this is compatible with GroupPermsLite!), however there is also nothing stopping you from registering all of the unregistered permissions for a plugin manually.
For example, here is how to register all of the permissions for Essentials (the most notorious for not registering their permissions): http://dev.bukkit.org/paste/7208/. You can cut and paste these into your permissions.yml if you use essentials. Be aware that permissions with square brackets [ ] around a permission node mean that you have to change that to the specific type you want in order for it to work.
Coming in v0.4: Added support for unregistered permissions - You will be able to grant unregistered permissions to a group with a prompt for confirmation
This plugin uses Java 7
If you get the followed error on starting up the server with this plugin installed "Unsupported major.minor version 51.0". This means you are using an out of date version of Java. If you don't know how to upgrade, please contact your server hosting provider and ask them for help in upgrading to Java 7, or contact Oracle customer support. Mac OS X users require JDK 7 instead of JRE 7.
Donations
If you'd like to contribute towards the continued development, support and maintenance of this project, please consider joining me on Patreon, and making a one-time or recurring pledge.
Help
If you need help you can leave a comment below and I will get back to you as soon as I can. You can also join my IRC chatroom using the following link. Please note, I am not always at my keyboard! http://webchat.esper.net/?channels=XHawk87&prompt=1
@CherryOnTheCake
Yes, that should work fine.
For extra features I could possibly create optional add-on plugins that can be installed along with GroupPermsLite, if a server owner should want that feature included.
One such add-on could grant display pre/suffixes and priorities to existing groups so that a the highest priority group for a player determines which pre/suffix is used in chat.
However, I could only spend time creating a new add-on if there was sufficient demand for it.
@XHawk87
Oh yeah I guess I can understand. Well, that's very kind of you, but I'll just use the nickname plugin which is already in Essentials. I think you meant something similar?
@CherryOnTheCake
As players can belong to several groups at once, this doesn't lend itself well to being an automatic display name prefix. I would also prefer to keep GroupPermsLite a lightweight plugin. Adding in an extra little feature here and there is a slippery slope towards become just like all of the other permissions plugins, bloated, complex and unwieldy.
What you could do is use a plugin that simply allows setting of player display names and records them for later sessions. I imagine there are such plugins around already, and if not I could make one. Would you like me to add it to my extra tasks?
@XHawk87
I mean a prefix for the ingame chat, different for every group. For example the admins (in the Admin group) will have <[Admin]PlayerX>.... in the chat. Or builder will be like <[Builder]PlayerY>. I think it's available in essentials groupmanager..
@CherryOnTheCake
What do you mean by pre/suffixes for groups? Could you give an example of how this would work?
@XHawk87
Oh thanks, just read it! :) And is there a possibility to make pre/suffixes for each group?
@CherryOnTheCake
Groups are created automatically when you add players or permissions to it.
The next version will contain a command to create a group without adding players or permissions.
Hi, nice plugin & work :) Little question, is there an ingame command to add groups?
Thanks
@to175
Hi to175
Although you can modify the configuration file directly, and I have provided support for reloading the config file from disk, this is intended for advanced users only. The next version will contain a tutorial inside the config file on first run, however for now I recommend using the in-game commands to create and manage groups and permissions.
If you really want to modify the config file directly, you will need to be familiar with YAML file format, as any errors in the formatting will mean the file cannot be read. The braces do need to be deleted, they merely represent an empty list. The permissions are stored in a hierarchy e.g.
In this case, the admin group gets the following permissions:
but cannot get the following permissions:
as the permissions is negative (false).
The default group is called "all" and would be entered like this:
Hi, it looks like to be a good plugin! Can you please make a Tutorial? This is must to know what can I put into bracket or no because I don't understand how configure it... Example : I have this code :
How can I put the permissions? I have to delete the braces? And How can I set the default group??
Thanks
@XHawk87
Okay. thank you so much. :) I made contact with my hosting.
@aradabir007
I would like to help you more, but I am afraid I have no experience with centos.
I recommend that you contact customer support for the hosting provider for your server to get their help in installing jre7, or else contact Oracle customer support for detailed instructions on how to install jre7 on centos.
@XHawk87
i couldnt install jre7 to centos. how can i do ?
@aradabir007
This type of error is usually caused by trying to run java code that was compiled in a more recent version of java on a machine running an older version. As the plugin was compiled in Java 1.7, you will need to update your version of java to JRE7 in order to run it. You can find the latest version of java on the Oracle website: http://www.oracle.com/technetwork/java/javase/downloads/jre7-downloads-1880261.html
You should also ensure that you are using jre7 to run craftbukkit and not an older version, as it is possible to have multiple versions installed at once. The means for doing this varies from one operating system to another, so I would advise you to use a search engine to find tutorials specific to your system if you are unsure on how to do this.
If you still have any problems after updating, please let me know
@XHawk87
http://i.imgur.com/sgKy88I.png
@aradabir007
Please send me server logs of any errors and a detailed description of the actions you took that led up to it failing, I will look into it for you.
it doesnt work on cb 1.4.6 r0.3 (beta build #2586) what is the problem ?
@bobberto7
That is my intention. I will not be adding in any extra features that bloat the plugin and complicate its use. It will remain simple and easy to use. Any updates I make will merely be to correct faults, make it even easier to use and understand, if possible, and make it compatible with Bukkit updates, if it should stop working in later versions for any reason.
@XHawk87
can you keep the plugin lite weight
The plugin has turned out to be more popular than I had anticipated. Nearly 500 downloads in the space of a week. Since it would appear I may need to write compatibility/bug-fixes and updates in the future for all of you, I have decided to add a donations button to allow you to help support my work.
There is no obligation to pay anything, everything I write and publish through BukkitDev is free software and free of charge, but donations from around £1 GBP* and upwards are welcome and help to support my future bug-fixes, updates and other works. I have to manage my time carefully, so the more I receive through this, the more time I can afford to spend coding for you all. Thank you.