TBMCPlugins / Chroma-Discord

A plugin that controls the ChromaBot Discord bot and provides Minecraft chat functionality and other features.
GNU General Public License v3.0
1 stars 0 forks source link

Permission checking for non-player senders cannot be done on the main thread #104

Closed NorbiPeti closed 5 years ago

NorbiPeti commented 5 years ago

LuckPerms blocks any request about permissions for offline players on the main thread.

[23:05:44] [Server thread/WARN]: Command processing failed for sender 'buttondevteam.discordplugin.DiscordSender@7dfa5572' and message '/yeehaw'
[23:05:44] [Server thread/WARN]: java.lang.RuntimeException: The operation to load user data for '00000000-0000-0000-0000-000000000000' was cancelled by LuckPerms. This is NOT a bug.
The lookup request was made on the main server thread. It is not safe to execute a request to
load data for offline players from the database in this context.
If you are a plugin author, please consider making your request asynchronously.
Alternatively, server admins can disable this catch by setting 'vault-unsafe-lookups' to true
in the LP config, but should consider the consequences (lag) before doing so.  
[23:05:44] [Server thread/WARN]:        at me.lucko.luckperms.bukkit.vault.LuckPermsVaultPermission.lookupUser(LuckPermsVaultPermission.java:160)
[23:05:44] [Server thread/WARN]:        at me.lucko.luckperms.bukkit.vault.LuckPermsVaultPermission.userHasPermission(LuckPermsVaultPermission.java:186)
[23:05:44] [Server thread/WARN]:        at me.lucko.luckperms.bukkit.vault.AbstractVaultPermission.playerHas(AbstractVaultPermission.java:154)
[23:05:44] [Server thread/WARN]:        at buttondevteam.lib.chat.Command2MC.hasPermission(Command2MC.java:63)
NorbiPeti commented 5 years ago

Fixed in TBMCPlugins/ButtonCore@a179236