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
@giano2
The command to add permissions to a group is:
/GroupGrantPerms [group] [(-)permission-string]
The "all" group is the default one that all players are in. To grant all players a permission, you would do: "/GroupGrantPerms all the.permission.node"
If you want to create a group that only includes the new players that join your server, I suggest setting up a little Skript to add players to that group on first join.
Can someone pleas help me with this plugin i understand everything exept adding a permission to it and i wanted to know how i can make a group default so that new player always come into that group the first time the enter my server if someone can help me with this pleas let me know
@XHawk87
I'm always impressed with how quickly you respond!
I think that's a fantastic idea for a workaround. I'll try that.
Thanks!
@adopted3
I have actually never come across this problem, nor has it been reported before. I reckon most plugins do not attempt to use a base permission node as a permission itself and instead only use the child nodes as permissions. The problem seems to be in how Bukkit formats the YAML config file on saving,
Becomes...
I should be able to add support for this type of permission in a later build. In the meantime, you should be able to workaround the problem by adding this to the Bukkit permissions.yml file:
After a restart, you should then be able to grant the "essentials.invsee" permission to players by giving them the "essentials.invsee.access" permission. You should be able to add a section like this whenever you need to grant both a base permission as well as a child to the same group.
I have trouble with sub-permissions.
For example, I add:
and
to our Admins.
But after a restart, only essentials.invsee.modify is in the list, and essentials.invsee is no longer permitted.
I'm sure you've had this issue before. Is there a workaround?
Thanks!
@XHawk87
I actually prefer your plugin more than GroupManager and others simply because of it's effectiveness and simplicity. Thanks for the advice!
@PancakeNinjaMC
The simplest way would be to run a command from your plugin. E.g.
However, if you are familiar with using another plugin as a library, you can follow the same steps and add GroupPermsLite as a dependency. The main plugin class is used as the central point tying all code together, so you should be able to do anything you want by getting hold of that instance. The methods you'll need are:
It wasn't designed as a library or I would have included proper documentation, tutorials and more easily accessible source code. If you're not familiar with using other plugins from within yours, I wouldn't recommend starting here as it wouldn't make a very easy or intuitive introduction to the subject, and I cannot offer much support.
Is there a way to access the /groupaddplayer command within a plugin I'm creating?
@Mr_Couch
If it doesn't work in 1.7.10, let me know
1.7.10 ever?
@adopted3
The /me command is in vanilla minecraft, and CraftBukkit. See http://wiki.bukkit.org/CraftBukkit_Commands
@xhawk87: Thanks for your reply. My problem was that the JustWarp plugin was also installed, and overriding the /setwarp and /warp commands. :-) Fixed it.
Now I'm having trouble with this... I did
but I find that regular players can still user the /me command.
I'll look into the essentials config file, as you suggested. Maybe it's trying to set up its own simple permissions.
Thanks again.
@adopted3
Essentials do not register their permissions, so GroupPermsLite cannot verify they have been entered correctly. When it says the permission node is unknown, just tell it to go ahead and add it anyway.
If the permissions themselves don't seem to be granted, refer to the Essentials documentation to be sure they are typed exactly right. You may also want to check the essentials config file to make sure that it is not trying to run its own simple permissions. This is known to cause to problems with permissions plugins.
IIRC, the per-warp-permission config setting makes it so you can set a permission for each individual warp. Perhaps there is a special format for their permission nodes to allow a permission for an individual warp location. Unless they have defined a parent permission node for all of these warps, having that setting may require you to have a permission added for each warp location.
Alternatively, you can define a parent permission yourself in the permissions.yml file. See http:wiki.bukkit.org/Permissions.yml
Can't get permission for /warp to work.
I have the essentials permissions registered in /permissions.yml.
I have
in essentials/config.yml
I have used /groupgrantperms to add these permissions to "all":
Any ideas?
Thanks
@gimmygummy
You can enter commands into the minecraft server console or in chat in-game.
are the commnads in game or in a code
i am new to this... and i have downloaded most of the files... but i am not sure whether it is ingame commands or in a code.. if it is a cod... where do i find it. and also i am on a mac... just in case that makes a difference
The UUID update is complete, and available here: http://dev.bukkit.org/bukkit-plugins/grouppermslite/files/5-group-perms-lite-v0-4-4-for-cb-1-7-9-r0-2-dev/
The file is unlikely to be approved by moderators anytime soon due to the current upheaval in BukkitDev staff. If you want to try it anyway, the download link above should work.
Please note: This WILL NOT WORK in earlier versions of CraftBukkit as it requires the UUID framework that was not added to Bukkit until recently. The earliest beta build of CraftBukkit that is known to work is 1.7.9-R0.3. Some earlier snapshots may also work, but are not supported by me.
This is also a development build, and has only received basic testing. If you have any problems, please let me know asap and I'll get another build out as soon as I can.
@EpicN1nja11111
We will be updating to record UUIDs of players, so that if a player signs in under a different UUID (I.e. they are attempting to steal the permissions of the player who had that name previously) they will lose their permissions. There will also be a command to allow the host to change a player's name and shift over all of their permissions with them. So if a player wants to change their name, they can apply to the host to change it.
To clarify, we will still be using player names so that it is easier for hosts to manage the config files. We're just adding security measures to prevent name-stealing and a convenience command for manually changing a player's name.
We may look into having an name-change detector that shifts over permissions automatically.
Are you going to update the for the 1.8 update, so you can add the player code to a group (instead of player data being kept by name, each player will have a player's unique identifying number, which means UUIDs, since in 1.8 you can change your name) btw, it is said that It may be in 1.8 that you can change your name, but they haven't confirmed it!
@ryan9103
Assuming you are using the RankDisplayNames add-on, it takes % or ยง as the formatting symbol.