LuckPerms

LuckPerms

41.4k Downloads

LuckPerms Bungee Prefix

xtechgamer735 opened this issue · 25 comments

commented

Hello!

I am trying to make it so the bungee version of LuckPerms displays the correct prefix dependant on what server the player is currently connected to. I want it to show in the "/lpb user info section". The ideas is to get this info into my own chat plugin eventually but until LuckPerms displays it correctly internally I suppose I've got no chance. Im using the code given in the wiki to get that value, but currently using the context of "allow all" as a workaround. It doesn't update when they change server so has prison ranks on creative for eg.

For example if they are on server 'skyprison' it should display the prefix which is attached to group 'fire' which is '[Fire]' (priority 2) that is assigned to them with context server 'skyprison'. I am unable to make it do this and give up myself.

Currently, the user has default group with a global prefix [Guest] (priority 0), plus a secondary prefix that is server specific for server 'skyprison' that is [G] (priority 1), to follow server tradition. That is the prefix that is showing currently. The problem is that the user has the fire parent assigned with context 'skyprison' and it refuses to show its meta even though the meta has a) a higher weight and b) correctly set for server bungee (name of LPB instance) and world set to the server name 'skyprison'

As you can see from the below screen shots, I have assigned server and world settings correctly for a bungee setup.

Any pointers will be much appreciated as to how I can do this,

Many thanks,

/lpb user info = https://imgur.com/a/xpd8l
/lpb user meta info = https://imgur.com/a/piPAh
Prefix Setting = https://imgur.com/a/tuj45

commented

For the Bungee different servers are considered worlds

commented

So, for you it would be something like /lp group fire meta addprefix 2 "[Fire]" sky

commented

Hello! As far as I am aware this is set correctly, as advised by discord support.

commented

Hi Brain, as you will see from the above screen shots this is how I’ve set it up. With every prefix assigned to the ‘bungee’ server with the correct server name as the world context. Many thanks!

commented

Looks fine to me.

What chat plugin are you using? This'll only work if you have a BungeeCord chat plugin installed.

As the correct value is being shown in theinfo command output - it's most likely not a LP issue.

commented

Hey @lucko

Thanks for your reply. The problem is that sadly the prefix is not being shown correctly inside luck perms.

As you will see from the screenshots, the user has the rank and meta for 'fire' applied but luck perms shows the default and lowest priority prefix for that user in info. Im trying to get a bungee chat plugin to work but the problem is that LP isn't giving it the correct information :/

commented

They should be set to the server skyprison, world global

commented

Not server bungee

commented

As far as I understand, the bungee version handles servers and worlds hence this setup. It was originally setup as you suggest and it didn’t work.

commented

It gives me an NPE when I try to run that command https://pastebin.com/NFYafVse

Using 4.1.25 :)

commented
commented

No luck either sadly https://pastebin.com/fn2P3jKd

commented

Can you send me the output to /lpb debug please

commented
commented

Ok thanks, I'm going to try to reproduce this tomorrow (going to sleep now)

commented

Thank you very much! Please give me a shout if you need anything else. I don't blame you, me too :)

commented

Ha okay, I got this working locally and immediately found the problem. 😄

subzeronetwork only inherits from fire in server=skyprison and importantly not on server=bungee.

Without this inheritance, their meta info looks like this.

Which is where the [G] prefix comes from.

The meta info output is a bit confusing I admit

Each of those lines should infact say something like..

-> 2 - '[Fire]' (inherited from fire on server=skyprison) (server=bungee) (world=skyprison)

You need to have your inheritances apply on server=bungee too.

When checking the prefix on server=bungee, the fire inheritance is completely ignored, as it doesn't apply in that context.

commented

Ah I think I understand, many thanks for looking into this. Is it possible to automate this in any way, so everything has the context of bungee automatically?

Groups change regularly you see and would be handy if this could be the case.

Many thanks.

commented

It's possible via the API using the FullySatisfiedContexts instance.

It's a bit of a hack - I'm not sure if it would ever make its way into the config file.

commented

Ooh that sounds up my street, I plan on using the API for my chat plugin.

Do you happen to have an example of it knocking around anywhere? No probs if not :)

commented

Lovely stuff thanks! Thank you very much for your help with this :)

commented

Can you send me an export file for your groups?

Run: /lp export export.txt and then send me the contents of export.txt in the LuckPerms folder

commented