LuckPerms

LuckPerms

41.4k Downloads

Changes made in API does not sync across the network.

Opened this issue ยท 3 comments

commented

I'm setting user's prefix on Bungeecord using LuckPerms API but it does not sync with other servers until I /lp sync.

All servers including Bungeecord is connected to the same MariaDB database and using sql as messaging channel.

        String tag = "insert tag from database here";
        LuckPermsApi api = LuckPerms.getApi();
        User u = api.getUserManager().getUser(player.getUniqueId());
        if (u == null) return;
        u.setPermission(api.getNodeFactory().makePrefixNode(3000, tag).build());
        api.getUserManager().saveUser(u);
commented

Hi there, the API has methods that allow you to sync the current server, as well as perform a network sync over the messaging service.

api.runUpdateTask(); // "sync" the current server api.getMessagingService().ifPresent(MessagingService::pushUpdate) // perform network sync

commented

Thanks, I couldn't find that in wiki.

commented

I asked you to open that issue because changes should propagate automatically.