LuckPerms

LuckPerms

41.4k Downloads

Bungeecord network bug

or01558 opened this issue ยท 7 comments

commented

Description

I setup a Bungeecord network and MySQL server and also setup MySQL in Luckperms (in the config of each server).
The database is working but I have one problem:
when I created a group with lpb creategroup name and then tried to use lp group in one of the spigot servers the group didn't appear in the list.
Also when I used lp group info name it worked.

Reproduction steps

  1. Setup a Bungeecord network and MySQL server.
  2. Setup MySQL in luckperms config in each server.
  3. Create group in the bungeecord server with lpb create group name and try to use lp group in one of the spigot servers.
  4. the group doesn't appear in the list of the lp group command.

Expected behavior

I expect that the group will be appear in the list

Environment details

I have three servers:

  1. Server type/version: This server is running Spigot version 1.16.4.
    Luckperms version: v5.3.13.
  2. Server type/version: This server is running Spigot version 1.16.4.
    Luckperms version: v5.3.13.
  3. Server type/version: This server is running Bungeecord version 1.8.x - 1.16.x.
    LuckPerms version: v5.3.13.
    image
    image
commented

Is it listed in /lp listgroups after running /lpb networksync?

What is sync-minutes set to in your LP config? Both in the server and proxy.

commented

Is it listed in /lp listgroups after running /lpb networksync?

What is sync-minutes set to in your LP config? Both in the server and proxy.

Yes It is listed.
The sync-minutes set to -1.

commented

Also this is listed without /lpb networksync.
it dosen't appear in the tab complete but still working.
My Problem is with the tab complete in commands that have groups list in tab complete.

commented

This is because LP does not send update changes when creating a group (it sends the action logging but not the actual "hey this group has updated" message) and I noticed that running /lp listgroups does "fix" it since it reloads the group list.

Not sure why Luck decided to do it this way? I want to know what his thoughts are.

For reference (no messaging service update and same applies for other group-changing events like the deletegroup command):
https://github.com/lucko/LuckPerms/blob/f8131224682d84922da8fcdb84f97e2e8393c42b/common/src/main/java/me/lucko/luckperms/common/commands/group/CreateGroup.java#L86-L110

commented

This is because LP does not send update changes when creating a group (it sends the action logging but not the actual "hey this group has updated" message) and I noticed that running /lp listgroups does "fix" it since it reloads the group list.

Not sure why Luck decided to do it this way? I want to know what his thoughts are.

For reference (no messaging service update and same applies for other group-changing events like the deletegroup command):
https://github.com/lucko/LuckPerms/blob/f8131224682d84922da8fcdb84f97e2e8393c42b/common/src/main/java/me/lucko/luckperms/common/commands/group/CreateGroup.java#L86-L110

OK, Thanks.
I will create a plugin that will run lpb networksync command every second to fix that.

commented

That's not ideal... if you're going to make a custom plugin anyways I suggest you use the LuckPerms API and listen to the GroupCreateEvent and GroupDeleteEvent and push updates through the messaging service when that happens.

You can find more info on how to use the LP API on these pages:
Introduction: https://luckperms.net/wiki/Developer-API
Usage (overview): https://luckperms.net/wiki/Developer-API-Usage
Example plugin for reference: https://github.com/LuckPerms/api-cookbook
JavaDoc for more info: https://javadoc.io/doc/net.luckperms/api/latest/index.html

You can join our discord server if you have any more questions about the API :)

commented

This is hardly a critical bug that renders the plugin unusable...

I will create a plugin that will run lpb networksync command every second to fix that.

Please don't ๐Ÿ˜…

Resolved by the commit below.