
Per-server default group assignments
Closed this issue ยท 11 comments
Is there any way to set the default group for when a new user logs into the server?! Cuz i really can't find it, not in tracks not in groups, nowhere. So maybe you could implement it or show me the LuckNode(Thats how i call your luck perms nodes for things like prefixes), or lead me to the command (If there). Cuz otherwise i have to use a first join plugin and i don't want that ๐
Also can you tell me whats the difference between the bungee cord version and the normal version?
-Jamie
The BungeeCord version runs on BungeeCord, and the Bukkit/Spigot version runs on Bukkit/Spigot. Other than that, they're exactly the same. ๐
As for the default group, there's not currently a way to change it. There's a good reason for this. (you actually could change it in older versions of the plugin.)
However, as a workaround, you can configure a group rewrite rule in the config file, and run
/luckperms group default setinherit <your "default" group>
Feel free to reopen this if you have any more questions. :)
Okey, i understand how it works now. But isn't there any way to add it in again without having this:
"The "default-group" option has been removed from the config. This was a necessary step to allow for better data storage (see above)."
Problem cuz you could use the thing used by prefixes "server/prefix.prio.prefixhere: true" but then for default groups (yes multiple) "server/default.prio.group: true" so you can also do multiple groups over the bungee and a global one.
Example:
You want players over the whole bungee network to have A rank as of default when they join the server, but when they then join prison they get the default group for the prison server, rank A which only is the default on the prison server, to with also the Default for all servers!
Isn't that possible for a next update? Just a suggestion, feel free to do what you want(your plugin!)!
-Jamie
Yeah, I kinda understand what you mean.
I guess automatic rankups won't work unless they're explicitly a member of the group. As far as I know, other servers using the plugin have avoided this issue but automatically adding them to a group when they join for the first time, but you're right, that's not ideal.
I'll have a think about the best way to handle this internally, and then implement some sort of solution.
Thanks for bringing it up. :)
Also, maybe a solution would be to have default tracks??? Like "server/default.prio.track" in the default track. But as for all I think I have provided you with enough things to experiment if you want! I do would really like it to see it coming to the plugin, cuz I really like luck perms but with something like firstjoinplus you get that people like donators and admins are being set to default again... Cuz I used pex before and are now busy with getting everything to luckoperms!!!!
So hope it gets implemented in one of the next updates, and I can fully go use luckperms as my permissions system!!
As of thanks for the fast reaction and support(Most Dev's don't even react)!
-Jamie
And forgot to say! But maybe a function for a whole server wide default group/track and a added per server default group.
Example:
Someone is rank "default" over the whole bungee network, and on the prison server they have got rank "A" added and when they join the kingdom server they still have "default" rank but instead of "A" they have rank "King"!
-Jamie
I've had a bit of a think, and developed this idea somewhat.
This is just a provisional config section example. I haven't actually implemented it yet, but the system will probably follow this form.
# This section allows you to define defaults to give users whenever they connect to the server.
# The default assignments are highly configurable and conditional.
#
# There is one default assignment built into LuckPerms, which will add all users to the "default" group if they
# are not a member of any other group. This setting cannot be disabled.
#
# IMPORTANT:
# In order to save storage space, LuckPerms does not store users who have no permissions defined, and are only a member
# of the default group. Adding default assignments to this section will negate this effect. It is HIGHLY RECCOMENDED
# that instead of assigning defaults here, you add permissions to the "default" group, or set the "default" group to inherit
# other groups, and then use the group-name-rewrite rule above.
#
# It is also important to note that these rules are considered every time a player logs into the server, and are applied
# directly to the user's data. Simply removing a rule here will not reserse the effect of that rule on any users who have
# already had it applied to them.
#
# The "has" and "lacks" settings below support standard boolean logic, using the 'and' & 'or' characters used in Java.
# e.g. "(some.other.permission | some.permission.other) & some.thing.else" == a user has 'some.other.permission', or
# 'some.permission.other', and they also have 'some.thing.else'
#
# Groups are represented by the permission node: group.<group name>
default-assignments:
rule1:
if:
has: (some.other.permission | some.permission.other) & some.thing.else
lacks: group.default
give:
- group.something
take:
- some.other.permission
Seems like a well config for the default assignments but I don't understand How most of the systems work: with "has" does it then check if a user has that permission or if the group has the permission(so that if the group has the permission it will assign people to it). And obviously I don't know where "lacks" stands for. I do understand "give" if I'm right, it's ment for giving that permission to a player right? And "take" is just for taking the permission.
Sorry for asking this but I'm not the best at English.
Do looks nice how it's all done!!!
-Jamie
Config has changed slightly. There's some examples there that should help you to understand it.
# +------------------------------------------------------------------------+ #
# | Default Assignments | #
# +------------------------------------------------------------------------+ #
# This section allows you to define defaults to give users whenever they connect to the server.
# The default assignments are highly configurable and conditional.
#
# There is one default assignment built into LuckPerms, which will add all users to the "default" group if they
# are not a member of any other group. This setting cannot be disabled. However, you can use this section to add more of
# your own.
#
# IMPORTANT:
# In order to save storage space, LuckPerms does not store users who have no permissions defined, and are only a member
# of the default group. Adding default assignments to this section will negate this effect. It is HIGHLY RECCOMENDED
# that instead of assigning defaults here, you add permissions to the "default" group, or set the "default" group to inherit
# other groups, and then use the group-name-rewrite rule above.
#
# It is also important to note that these rules are considered every time a player logs into the server, and are applied
# directly to the user's data. Simply removing a rule here will not reserse the effect of that rule on any users who have
# already had it applied to them.
#
# The "has" and "lacks" conditions below support standard boolean logic, using the 'and' & 'or' characters used in Java.
# e.g. "(some.other.permission | some.permission.other) & some.thing.else" == a user has 'some.other.permission', or
# 'some.permission.other', and they also have 'some.thing.else'
#
# Groups are represented by the permission node: group.<group name>
# Per server and per world nodes are represented by: "server-world/permission" or "server/permission"
#
# Within conditions, permission nodes MUST be escaped using "<" and ">". See the example below.
#
# Explaination of the examples below: (they're just to demonstrate the features & use cases)
#
# rule1:
# If a user is either in the vip or vip+ group, and they have the "titles.titlecollector" permission set to true, and the
# "some.random.permission" set to false... if they're not in the group "prison_titlepack" on the "prison" server, then
# give add them to the "prison_titlepack" group on the "prison" server, and remove "some.random.permission".
#
# rule2:
# If the user isn't in any of the following groups on the skyblock server: sb_level1, sb_level2, sb_level3, then add
# them to sb_level1 on the skyblock server.
default-assignments:
rule1:
if:
has-true: (<group.vip> | <group.vip+>) & <titles.tilecollector>
has-false: <some.random.permission>
lacks: <prison/group.prison_titlepack>
give:
- prison/group.prison_titlepack
take:
- some.random.permission
rule2:
if:
lacks: <skyblock/group.sb_level1> & <skyblock/group.sb_level2> & <skyblock/group.sb_level3>
give:
- skyblock/group.sb_level1
Basically, it allows you to setup additional "default" groups that are given to users when they login. However, instead of implementing that directly, I've allowed for a great deal of configuration, so you can pretty much make up whatever rule you like.
Yes I see it now, what a great system have you created based on the idea of just giving per server groups, you can now give basically everything as default thing! That's like even 10x better! Can you keep this thread updated and tell me when it's stable?
-Jamie
I've tested it myself and it seems to work fine. Download from here: https://ci.lucko.me/job/LuckPerms/240/
I won't know if it's "stable" until other people try and use it. ๐
I'll close this issue for now, since the issue is resolved. Feel free to open a new issue if you find any problems. :)