-
-
Notifications
You must be signed in to change notification settings - Fork 380
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ask for player's groups off the main thread. #6192
Conversation
This version should support 1.13 to 1.17+ according to the Spigot page. I'm not sure what this actually adds but it's usually a good idea to keep dependencies updated and all 1.7.X versions of Vault are supposed to be compatible. :)
This change is (basically) pointless -- we still block the main thread while we wait since we absolutely need to, but it prevents the errors from overzealous permissions plugins.
actually, would this cause potential new issues with other permission plugins that may expect/require the API to be called from the main thread? |
No idea, I'm fairly sure PermissionsEx is old enough that it doesn't care but I don't know about any other permissions plugins (if there are any) -- the only report we've had is LuckPerms so we could do it on a different thread iff LuckPerms is present but then that wouldn't fix it if anything else had the same requirement (or if our check didn't catch everything) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good work Kenzie ⚡ Let's hope it doesn't break other permission plugins
If somebody knows what permissions plugins are used currently they could test this. |
Description
Updates the matched vault version to 1.7.3.
LuckPerms is a little overzealous and prints a giant error when requesting groups on the main thread using the vault hook.
Since
player's group[s]
is an expression Skript doesn't have the option of waiting for it to resolve on a background thread.My solution was to do the call in a completable future and block while waiting for it to resolve, so it effectively does the same thing as before without triggering the error.
Obviously this isn't ideal, but it seemed better than trying to disable the LuckPerms check specifically while the server was running.
Target Minecraft Versions: any
Requirements: none
Related Issues: #5692