LuckPerms

LuckPerms

41.4k Downloads

Lags when changing game mode

madebygood opened this issue ยท 3 comments

commented

Description

Switch between game modes quickly and repeatedly.

If the luckpemrs plugin is not present, it will switch immediately.

However, there is a slight delay when changing the game mode with luckperms.

This is not a server-side delay, it is a client-side ping delay.

Reproduction Steps

/gm 0
/gm 1
Repeat 1-2 30 times very fast

This is a problem when used with luckperms and other plugins.

However, if you disable luckperms with plugman, the game mode transition lag disappears immediately.
I've tested it several times, and there is no lag only when luckperms is not present.

Expected Behaviour

ping lag

Server Details

1.18.2

LuckPerms Version

5.4.21 (Bukkit and bungee)

Extra Details

This is the result of checking with /lp verbose.

I found out why there was no choice but to lag.
laglog.txt

commented

The server already checks for every permission "attached" to a command when you log in, so it tells the client what commands it can "see" / will be suggested when you start typing a command. When changing game-modes your permissions may change and need to be re-checked again so LP tells the server to send the available command list again (e.g. if you denied a permission for a command, then the updated command list won't include the command for that permission). In most cases this is not an issue and it depends on many factors how much it impacts the server, but you can turn that feature off by changing this setting to false

# If LuckPerms should update the list of commands sent to the client when permissions are changed.
update-client-command-list: true

The problem has been resolved,
thank you.

commented

You can see in verbose that hundreds of permissions are checked not only when changing gamemodes, but also when connecting to the server.

Therefore, even when connecting, the client hangs for a few seconds.

commented

The server already checks for every permission "attached" to a command when you log in, so it tells the client what commands it can "see" / will be suggested when you start typing a command.
When changing game-modes your permissions may change and need to be re-checked again so LP tells the server to send the available command list again (e.g. if you denied a permission for a command, then the updated command list won't include the command for that permission).
In most cases this is not an issue and it depends on many factors how much it impacts the server, but you can turn that feature off by changing this setting to false

# If LuckPerms should update the list of commands sent to the client when permissions are changed.
update-client-command-list: true