Closed kalleswe closed 1 year ago
a) Ask the author of the plugin making the request to perform Vault calls for offline players "asynchronously" (using the scheduler). Additionally, prefer using the methods that accept 'Player' or 'OfflinePlayer' instead of usernames. You should be able to identify the plugin making the request in the trace below.
As seen here https://github.com/okx-code/Rankup3/blob/28d011b9cba82fe728a6a05c1f744fbe6db31c43/src/main/java/sh/okx/rankup/hook/VaultGroupProvider.java#L21 the OfflinePlayer recommendation is already in use. Performing offline player lookups asynchronously could be a future enhancement.
b) As a server admin, you can disable this exception by setting 'vault-unsafe-lookups' to true in the LuckPerms configuration file. However, please use this only as a last resort.
Try this for now.
Rankup does not look up data for offline players
**[15:28:56 INFO]: player issued server command: /rankup
org.bukkit.command.CommandException: Unhandled exception executing command 'rankup' in plugin Rankup v3.13.3 at org.bukkit.command.PluginCommand.execute(PluginCommand.java:47) ~[paper-api-1.19.3-R0.1-SNAPSHOT.jar:?] at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:155) ~[paper-api-1.19.3-R0.1-SNAPSHOT.jar:?] at org.bukkit.craftbukkit.v1_19_R2.CraftServer.dispatchCommand(CraftServer.java:929) ~[paper-1.19.3.jar:git-Paper-362] at org.bukkit.craftbukkit.v1_19_R2.command.BukkitCommandWrapper.run(BukkitCommandWrapper.java:64) ~[paper-1.19.3.jar:git-Paper-362] at com.mojang.brigadier.CommandDispatcher.execute(CommandDispatcher.java:264) ~[paper-1.19.3.jar:?] at net.minecraft.commands.Commands.performCommand(Commands.java:313) ~[?:?] at net.minecraft.commands.Commands.performCommand(Commands.java:297) ~[?:?] at net.minecraft.server.network.ServerGamePacketListenerImpl.performChatCommand(ServerGamePacketListenerImpl.java:2288) ~[?:?] at net.minecraft.server.network.ServerGamePacketListenerImpl.lambda$handleChatCommand$20(ServerGamePacketListenerImpl.java:2248) ~[?:?] at net.minecraft.util.thread.BlockableEventLoop.lambda$submitAsync$0(BlockableEventLoop.java:59) ~[?:?] at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1768) ~[?:?] at net.minecraft.server.TickTask.run(TickTask.java:18) ~[paper-1.19.3.jar:git-Paper-362] at net.minecraft.util.thread.BlockableEventLoop.doRunTask(BlockableEventLoop.java:153) ~[?:?] at net.minecraft.util.thread.ReentrantBlockableEventLoop.doRunTask(ReentrantBlockableEventLoop.java:24) ~[?:?] at net.minecraft.server.MinecraftServer.doRunTask(MinecraftServer.java:1341) ~[paper-1.19.3.jar:git-Paper-362] at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:197) ~[paper-1.19.3.jar:git-Paper-362] at net.minecraft.util.thread.BlockableEventLoop.pollTask(BlockableEventLoop.java:126) ~[?:?] at net.minecraft.server.MinecraftServer.pollTaskInternal(MinecraftServer.java:1318) ~[paper-1.19.3.jar:git-Paper-362] at net.minecraft.server.MinecraftServer.pollTask(MinecraftServer.java:1311) ~[paper-1.19.3.jar:git-Paper-362] at net.minecraft.util.thread.BlockableEventLoop.managedBlock(BlockableEventLoop.java:136) ~[?:?] at net.minecraft.server.MinecraftServer.waitUntilNextTick(MinecraftServer.java:1289) ~[paper-1.19.3.jar:git-Paper-362] at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1177) ~[paper-1.19.3.jar:git-Paper-362] at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:316) ~[paper-1.19.3.jar:git-Paper-362] at java.lang.Thread.run(Thread.java:833) ~[?:?] Caused by: me.lucko.luckperms.bukkit.vault.ServerThreadLookupException: A Vault API request has been made on the main server thread that LuckPerms cannot safely respond to. This is NOT a bug - please do not report it to LuckPerms. Instead, please carefully read the information given below.
LuckPerms cannot respond to the request because to do so:
Performing this lookup on the main server thread would cause your server to lag. There are two solutions to this problem: a) Ask the author of the plugin making the request to perform Vault calls for offline players "asynchronously" (using the scheduler). Additionally, prefer using the methods that accept 'Player' or 'OfflinePlayer' instead of usernames. You should be able to identify the plugin making the request in the trace below. b) As a server admin, you can disable this exception by setting 'vault-unsafe-lookups' to true in the LuckPerms configuration file. However, please use this only as a last resort. at me.lucko.luckperms.bukkit.vault.LuckPermsVaultPermission.lookupUser(LuckPermsVaultPermission.java:156) ~[?:?] at me.lucko.luckperms.bukkit.vault.LuckPermsVaultPermission.userGetGroups(LuckPermsVaultPermission.java:260) ~[?:?] at me.lucko.luckperms.bukkit.vault.AbstractVaultPermission.getPlayerGroups(AbstractVaultPermission.java:413) ~[?:?] at sh.okx.rankup.hook.VaultGroupProvider.inGroup(VaultGroupProvider.java:21) ~[Rankup-3.13.3.jar:?] at sh.okx.rankup.ranks.Rank.isIn(Rank.java:33) ~[Rankup-3.13.3.jar:?] at sh.okx.rankup.ranks.RankList.getByPlayer(RankList.java:113) ~[Rankup-3.13.3.jar:?] at sh.okx.rankup.RankupHelper.checkRankup(RankupHelper.java:154) ~[Rankup-3.13.3.jar:?] at sh.okx.rankup.RankupHelper.checkRankup(RankupHelper.java:143) ~[Rankup-3.13.3.jar:?] at sh.okx.rankup.commands.RankupCommand.onCommand(RankupCommand.java:39) ~[Rankup-3.13.3.jar:?] at org.bukkit.command.PluginCommand.execute(PluginCommand.java:45) ~[paper-api-1.19.3-R0.1-SNAPSHOT.jar:?] ... 23 more