LuckPerms

LuckPerms

41.4k Downloads

BungeeLuckPerms - how can i set a serverspecific permission?

o0Julia0o opened this issue · 4 comments

commented

I am using this bungee-proxy plugin and only have permissions set on bungee-proxy for this plugin:
https://www.spigotmc.org/resources/slashserver.75/

How it is working right now:
The USERNAME1 can´t use slashserver.hub
Using: storage-method: yaml

What i want to have:
a) USERNAME1 should be in group: member
b) USERNAME1 and all users in group "member" should use proxy-command: slashserver.hub on backendserver: wood. But not on backendserver: prison.
https://i.imgur.com/2IDjJXH.jpg
c) storage-method: yaml

What i do is:
lpc create group member
lpb user USERNAME1 switchprimarygroup member
lpb group member permission set slashserver.hub true server=bungee world=wood
lpb group member permission set slashserver.hub false server=bungee world=prison

The result:
The user of group member can use the slashserver.hub on both backendservers(wood & prison)

If i then edit the users.ylm:
If i edit it like this, the user called USERNAME1(group member) can´t use the proxy-command slashserver.hub at all! Not on wood-backendserver not on prison-backendserver.
https://i.imgur.com/hE8x3et.jpg

If i edit it back like it was before like this, the user called USERNAME1(group member) can use the proxy-command slashserver.hub on all backendservers(wood & prison):
https://i.imgur.com/cpLnXmb.jpg

Even if i deactivate luckpermbungee on the proxy-server the user USERNAME1 gets:
https://i.imgur.com/kMYigPY.png
if he uses: the slashserver.hub-command: /hub
(but the admin can use the command)

Can´t change primary-group:
If i do lpb listgroups and the user USERNAME1(group member) is online, this is shown:
https://i.imgur.com/9Jwk8yr.jpg
Hasn´t it to be a "1" behind the "member -"? Because USERNAME1 is online?

The primary-group for the user USERNAME1 is not set to "member":
https://i.imgur.com/uShdYkR.jpg
Why? In the picture above(If i then edit the users.ylm) you can see that the USERNAME1 has group "member" set!?

LuckPerms-Bungee-4.2.12.jar itself i running and reacting to my changes:
If i edit the member.yml with notepad++ whilst the proxy-server is running i get:

"22:33:38` [INFORMATION] [LP] [FileWatcher] Detected change in group file for member - reloading..."
if i edit the userfile of USERNAME1 whilst proxy-server is running i get:
"22:36:20 [INFORMATION] [LP] [FileWatcher] Detected change in user file for USERNAME1 - `reloading..."

If i delete the user.yml of USERNAME1, and look up userinfo(lpb user USERNAME1 info), he is in default-group as expected:
https://i.imgur.com/m19ByYl.jpg
But if i do:
lpb user USERNAME1 switchprimarygroup member
i get:

Warning: The primary group calculation method being used by this server (parents-by-weight) may not reflect this change.
22:48:03 [INFORMATION] [LP] USERNAME1 was not already a member of member, adding them now.
22:48:03 [INFORMATION] [LP] USERNAME1's primary group was set to member.

If i now look up userinfo i get this:
https://i.imgur.com/MLX7vHK.jpg
He is still in default-group. Why? He has set member under a section called "parent" additionally to default in this section.

If i do:
"lpb group member permission set slashserver.hub true server=bungee world=wood"
I get:

23:05:50 [INFORMATION] [LP] member already has slashserver.hub set in context server=bungee,
world=wood.

Warning:
I found out how to get rid of the warning-message mentioned above: "Warning: The primary group calculation method being used by this server (parents-by-weight) may not reflect this change."
I set in config.yml of BungeeLuckPerms:
primary-group-calculation: stored
(is had been set to "parents-by-weight").
So the userinfo now is shown as:
https://i.imgur.com/077rcFE.jpg
But still the USERNAME1 has no permisson to do the command :(

What is meant with "bungee"?:
I set up this command:
lpb group member permission set slashserver.hub true server=bungee world=wood

I know what "wood" is, i named so my backendserver. But what is "bungee"? Where can i find "bungee" in my files? I never used this word anywhere? I have a BungeeCord.jar in my Folder: -> server\proxy\BungeeCord.jar
Do i have to rename bungee in the command to BungeeCord? Or rename the BungeeCord.jar to Bungee.jar? I don´t know where i have to look up this "bungee" in the command. So i deleted the member.yml and set up this commands in proxy-console:

lpb group member permission set slashserver.hub true server=bungee world=wood
lpb group member permission set slashserver.hub true server=proxy world=wood

Getting this result:
https://i.imgur.com/q3ZEMCb.jpg
But still the user in member-group don´t have permission for the /hub-command.
The admin.yml looks like this:
https://i.imgur.com/dOq0h5j.jpg
If i edit the member.yml like the admin.yml like this:
https://i.imgur.com/dnN5HM4.jpg
the user USERNAME1 and users of the group member can use the command. But it is not wanted that thauy can use the command on every backend-server(What i want to have).

Anyone any idea? What´s the problem? So how do i get it work like i say in "What i want to have: b)"?

versions:
BungeeCord-Bootstrap:1.12-SNAPSHOT:968916c:1316
LuckPerms-Bungee-4.2.12.jar

commented

Skipping is the solution - thank you! Wondering now hat the "=bungee" is good for in another setup without YAML?

commented

I really appreciate the detailed report, but I'm finding it very difficult to follow what the actual problem is.

He is still in default-group. Why? He has set member under a section called "parent" additionally to default in this section.

The command tells you why, the switchprimarygroup command does just that, it switches the primary group....

You need to use parent set if you want to override the existing parent.

The option is being ignored because of this option - again the command tells you this.
https://github.com/lucko/LuckPerms/wiki/Configuration#primary-group-calculation

I know what "wood" is, i named so my backendserver. But what is "bungee"? Where can i find "bungee" in my files? I never used this word anywhere? I have a BungeeCord.jar in my Folder: -> server\proxy\BungeeCord.jar
Do i have to rename bungee in the command to BungeeCord? Or rename the BungeeCord.jar to Bungee.jar? I don´t know where i have to look up this "bungee" in the command. So i deleted the member.yml and set up this commands in proxy-console:

No, if you're using local storage (YAML) you can skip the server=bungee bit.

Sorry if I've missed some of your questions, but as I said, it's very difficult to follow the sequence of events and questions here.

If you still have further queries, please ask them clearly, and separate each individual question.

commented

If you have a network setup with a database, servers can be named. And by adding the context server=<server> that permission/group/etc only applies on that specific server.

commented

ah! o.k. thx!