LuckPerms

LuckPerms

41.4k Downloads

Possible API issue related to server context

NotMyFault opened this issue ยท 17 comments

commented

Heyo,

I'm using Tab to display ranks and prefixes in the tablist.
Accordingly to the author, the lp api ignores per-server context.

Would it be possible to implement something like that?
I'm on lp v5.0.56 btw

commented

I'm pretty sure that LuckPerms doesn't ignore a feature that it actually uses itself.
This makes absolutely no sense whatsoever.

commented

Smells like they're just not using the API correctly.

commented

Well, if you run /lp user <user> info does the primary group respect the context there?

commented

I'm not really sure what the issue is here - could you give an example of what you're currently seeing and how that differs from what you expect?

commented

I assume you have the plugin on your BungeeCord proxy (the tab plugin)?
In addition do I personally recommend BungeeTabListPlus, as it allows you to have separate YAML-files for tab lists, which can be per-server (plus, it also has cool features like custom player slots)

commented

I assume you have the plugin on your BungeeCord proxy (the tab plugin)?

No

commented

I'm not really sure what the issue is here - could you give an example of what you're currently seeing and how that differs from what you expect?

The problem is that Tab displays prefixes regardless the server context set in LP. So if a user is in a group and has a prefix on server1 it will display the prefix on server2 as well, if you are using the same setup, ranks, etc. But Neznamy believes it's an issue with the LP api not supporting server contexts not allowing his plugin to work properly.

commented

Well... Then it kinda doesn't make sense that the tab shows the prefix from other servers because afaik would tabs be separated per server when you're not using a bungee plugin for it.

I recommend using a tab plugin for BungeeCord for easier configuration and management.

commented

I recommend using a tab plugin for BungeeCord for easier configuration and management.

You don't seem to understand what I mean. If a user is in groupA with the server context server1 it will show the prefix fine, like intended. But if a user is in groupA with the server context server2 on a different server it will show the group prefix still, yet it's a different server. The only thing in common are the rank names and the same lp db. Given that, Tab does not respect per-server context, like I originally stated. Therefore, I reached out to the author of Tab seeing if it's an issue with Tab but they claim it's lp not working properly.

commented

You don't seem to understand what I mean.

Considering that I asked you if you use the tab plugin on the proxy and you answer with "No" is this for sure a misunderstanding due to not giving clear information.

commented

Hey @lucko do you think you might could come up why User#getPrimaryGroup() does not respect server contexts like I described above does not work?
Would be a charm.

Cheers

commented

The User#getPrimaryGroup() API method will output exactly the same value as the one in the /lp user <user> info command.

commented

2020-04-02_10 17 39
I think I have kind of the same issue, is this normal ? (I'm on server1 and I have fly on global and master on server1, master have a higher weight so he should be assigned to me right ?)
2020-04-02_10 20 50
because then my tablist is broken and it isn't from TAB (it shows the prefix of the group fly wich is a white F)

commented

@Tanguygab That looks normal to me - seems like your tab plugin is just pulling the prefix value and using that?

Regarding the main issue brought up here:

The User#getPrimaryGroup() API method will output exactly the same value as the one in the /lp user <user> info command.

So unless you're seeing a disparity in what shows in the info command and what is being exposed via the API, then I don't believe there is any bug here.

Closing for now, but please feel free to re-open if there's more info to give.

commented

@Tanguygab That looks normal to me - seems like your tab plugin is just pulling the prefix value and using that?

Regarding the main issue brought up here:

The User#getPrimaryGroup() API method will output exactly the same value as the one in the /lp user <user> info command.

So unless you're seeing a disparity in what shows in the info command and what is being exposed via the API, then I don't believe there is any bug here.

Closing for now, but please feel free to re-open if there's more info to give.

The TAB plugin is correct, it's just that LP isn't taking the right group, check the screen with my LP info, I have the group Fly instead of Master. But I should have Master because he has a higher priority

commented

Ok, it seems to has been fixed somehow when I've updated to a newer build. Idk why it did that