LuckPerms | An advanced permissions plugin

LuckPerms

Useful Links

Description

LuckPerms is an advanced permissions implementation aiming to be a fast, reliable and flexible alternative to existing permission plugins. The project’s main goals are centered around high performance and a wide feature set, filling the gaps of functionality and building upon existing features found in other plugins. LuckPerms also includes an extensive API for developers, and support for a variety of Minecraft server software & data storage options.

LuckPerms is currently the only maintained and ‘working’ permissions plugin for Sponge servers.

For more, see the wiki article on Why LuckPerms?

Wiki Index

Setup

Features

Developers

Other

External connections and 3rd party software

In order to deliver it’s functionality, LuckPerms will under some circumstances make connections with and communicate with external services outside of the local server.

A number of 3rd party libraries are also used by the plugin.

These are all detailed on this wiki page.

Support

Hopefully you find this plugin useful! Please leave any questions, feedback or suggestions below and I’ll try to get back to you. :slight_smile:

If you’re having issues with the plugin or would like to contact me directly, the best way is via the Discord server linked at the top of the page. (I don’t check the forums much!)

29 Likes

I love it! :grinning:
Great implementation and great documentation! Clean and to the point~
(This is what separates good from great. :clap:)
Will definitely make use of LuckPerms.
Nice work! :thumbsup:

4 Likes

I like seeing additional permissions systems, but does this differ in any significant way to the existing implementations?

I’m always interested in the differences rather then what’s the same between them, as I think the concept of permissions has gotten somewhat stale in the way that they are specified compared to the early days, and that there is room for innovation.

I totally agree! I noticed as I was posting this that there are a lot of alternative permission plugins popping up for Sponge, and I understand PermissionsEx has been ported too. I haven’t had a chance to look deeply into any of the alternative Sponge implementations, but my first impression was that they all seemed somewhat simplistic and lacking in features. I might be wrong though. :stuck_out_tongue:

I made a chart comparing LuckPerms to most of the other popular implementations, although aside from PEX, they’re all Bukkit plugins. Maybe you’ll find it useful anyway, just as a comparison, so here it is: https://static.lucko.me/luckperms-compare.png

The features list above might give you a good idea too. I tried to cover most features seen in other implementations, and added a few of my own ideas, as well as a proper API and support for all of my favourite platforms (Sponge/Bukkit/Bungee).

3 Likes

I like this perms plugin, your commands are a little more straightforward than pex. Yet, I dont understand this WANT to get away from editing a permissions yaml. I mean even for novice server owners having to run 50 commands to get a simple group setup is inefficient. Its much easier to Define a group, set 40+ permission nodes, a prefix, suffix and inheritance inside a text file. (Thanks to notepad++ or equivalent of course!). So this hatred of taking 10 minutes to copy and paste in permission nodes vs an hour typing out all of it is kinda…well in my honest opinion, backwards thinking. I guess I myself am just a novice server owner and I always used Group Manager. And it was a cinch to set up. Once the newbie gets past the fact you need a 4 space tab, yaml isnt all that intimidating.

2 Likes

I kinda understand what you’re getting at.

If you know the file format inside out, then maybe you’re right, it is quicker to type out a list of nodes in a file. However, the problem comes when you don’t know the format, you make a mistake, or want to push the same permissions across multiple servers.

File parsing errors are far far harder to diagnose with a user, than commands. At least in LuckPerms, you literally cannot make errors when setting up permissions, as it won’t let the command execute, and it will spit back an error explaining exactly what was wrong. I think you’d be lucky to get that much diagnostic when loading screwed up YAML.

Off-topic slightly, I was under the impression that Sponge wasn’t really supporting YAML? Perhaps I’m mistaken, but I’m pretty sure the de-facto for config files is .conf here? Maybe not, Idk. :stuck_out_tongue:

Anyway, back to your point. LuckPerms actually does have support for flatfile. User, group and track data is each saved within it’s own file, in the popular json format. My advice is to generate a file for yourself, using commands, work out how the format works, and then edit the files by hand if you must.

I should also add, there is support for automatic migration from a number of existing plugins, GroupManager included. Check the wiki page for info on that.

That aside, thank you for the feedback! :slight_smile:

2 Likes

Thanks for hearing me out. And you are right sponge is using hocon. Snake yaml would always spit out the line in the console/log stating what line in the group manager config was not formated properly. I think that there should just be a template group, world and user in the flat file for those who prefer flat file but are not familiar with the hocon format.

1 Like

There will be files there by default. A default group is made when the server first starts, and new user files are made whenever a new player joins the server. You should be able to work out the format just by looking at those files, or using the commands if you’re unsure about how to setup inheritances, per server/world permissions, prefixes/suffixes, etc.

2 Likes

Seems to work fine, had some trouble but fixed it. Didn’t know i had to include SpongeAPI for it to work.

Also, can you explain why there’s so much “nulls” in the MySQL? http://prntscr.com/c9xbgl

LuckPerms is lacking context implementation which PEX supports. Without this feature, many sponge plugins such as GriefPrevention will not be able to work with your plugin as it is a crucial part of Sponge’s Permission’s API. I would suggest implementing it =). I also see no support for options.

@Beauseant Because a user with that UUID hasn’t joined the server since you installed the plugin.

@blood Yeah, it doesn’t currently implement PermissionService, just relies on the default Sponge backed one. (mentioned in caveat #1 in the original post) I wasn’t aware that this was an issue, though, so thank you for letting me know.

I intend to implement it soon, and actually did try to do it initially, but found the entire thing to be incredibly complicated. I’m sure it makes perfect sense to you, but as someone reading the API for the first time, it was pretty hard to understand. :stuck_out_tongue: The Sponge Docs article on permissions is also empty, which made it even harder, as I was just reading javadocs and source code, without any real explanation of what the purpose of the entire system is. I even spent a good hour or so reading over the PEX 2.0 source code, to see how it was implemented, and I couldn’t make much sense of that either. :confused:

I plan to work on it eventually. For now, this plugin serves as a way to serve the same permissions to a Bungee proxy and a network of Sponge servers, for those looking for that sort of functionality.

Edit: Actually no, I take that back. The PermissionService made absolute sense, the part that really confused me was the whole Context system. Are plugins forced to add an implementation for all of the static contexts in the Context class? The JavaDocs for Contexts in general is really brief. Anyway, I’ll take another look. :slight_smile:

Also not sure what you mean by “options”?

Strange, i’ve logged in multiple times but it hasn’t added me yet. When does it generate my UUID? At login?
Also, can you explain me why i get this error? I’m really not into Forge (sponge) yet, so sorry if i’m asking a lot of questions :slight_smile: http://pastebin.com/ghhPGw4L

@Beauseant Ah, yeah that’s my bad. Could you tell me which server/sponge version you’re using?

A friend of mine (dev) found a fix. We needed to import the java MySQL library (MySQL :: Download Connector/J) and put it into the /mods map. Thanks for the help anyway!

Yep, but you shouldn’t have to do that. I was under the impression that it was always present. (At least it has been in my testing) Meaning I’m not handling MySQL correctly. I’d appreciate if you tell me which version it is, so I can attempt to fix it for other users. :smiley:

https://github.com/SpongePowered/SpongeAPI/blob/bleeding/src/main/java/org/spongepowered/api/service/permission/SubjectData.java#L176

A context is literally just keys and values that permissions should be able to vary on.

e.g. regions, worlds, ports.

Understood. The thing that threw me off was this.

https://github.com/SpongePowered/SpongeAPI/blob/bleeding/src/main/java/org/spongepowered/api/service/context/Context.java#L39-L45

They’re presumably just defaults? Do I have to implement support for any possible context another plugin may add or use? Actually I think I’ve answered my own question? haha.

MYSQL 5.7.14
LuckPerms 2.5.20
Sponge API 4.10
Forge 1.10.2-12.18.1.2073
SpongeForge 1.10.2-12.18.1.2073-5.0.0-BETA-1685.jar

Do you need anything else as well? :slight_smile:

No, that’s perfect! Thank you. I’ll get it fixed now.

Also, i want to suggest a feature. I’ve run into problems multiple times with giving people OP just to let them use command blocks. I would give them OP, and then forget about it after a while; without taking away OP rights. I’ve been used to a feature with a custon Spigot plugin to de-op players automaticly if they join. So they need to receive it from someone who can supervise the command block usage; just because they can do things with OP rights which are pretty devestating.
Could you let there be a config option in which we could automaticly de-op players on join? I think it would be an awesome feature, not only for me but for other users as well!