-
-
Notifications
You must be signed in to change notification settings - Fork 71
[Feat] AsyncOfflinePlayerArgument #632
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
[Feat] AsyncOfflinePlayerArgument #632
Conversation
…AsyncOfflinePlayerArgument
Added: AsyncOfflinePlayerArgument to CommandTreeDSL & CommandAPICommandDSL
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.
Generally fine, but I noticed a few minor things that I marked.
Regarding the documentation changes, we are, or rather we have migrated the documentation to a new repository located at https://github.com/CommandAPI/docs
While I consider it fine to accept these for now, you should definitely propose the documentation changes to the docs repository.
...api-bukkit-core/src/main/java/dev/jorel/commandapi/arguments/AsyncOfflinePlayerArgument.java
Outdated
Show resolved
Hide resolved
...api-bukkit-core/src/main/java/dev/jorel/commandapi/arguments/AsyncOfflinePlayerArgument.java
Show resolved
Hide resolved
commandapi-core/src/main/java/dev/jorel/commandapi/arguments/CommandAPIArgumentType.java
Outdated
Show resolved
Hide resolved
...ns/src/main/java/dev/jorel/commandapi/annotations/arguments/AAsyncOfflinePlayerArgument.java
Show
8000
resolved
Hide resolved
Co-authored-by: DerEchtePilz <81232921+DerEchtePilz@users.noreply.github.com>
Co-authored-by: DerEchtePilz <81232921+DerEchtePilz@users.noreply.github.com>
…in the Annotations class
…i:offline_player -> api:async_offline_player
Thank you for taking the time to review my code and for your helpful feedback! I’ll make sure to open a PR in the documentation repository to integrate the changes I’ve made here into the new docs repository. For now, I’ll quickly test everything to confirm that the changes are working as expected, and I’ll keep you updated on the results. Thanks again for the guidance! |
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.
Also, on second thought, because we're planning to continue with the documentation in the docs repo anyway it makes little sense to make changes to the existing documentation here.
So: please propse them to the docs repo and remove the changes to it here.
Tested everything, and reverted the documentation changes. |
Yeahh...., so I was forking the docs repo (without all branches selected), so I thought I'll quickly remove the fork and create a new one, but I accidentally removed my CommandAPI (this repo) fork. Gotta love it. LOL |
Description
This pull request introduces the
AsyncOfflinePlayerArgument
, which extends theSafeOverrideableArgument
class. The new class wraps the existingOfflinePlayerArgument
within aCompletableFuture<OfflinePlayer>
, enabling asynchronous handling of the offline player argument in commands. By using this approach, the logic involving API calls to fetch the offline player will be executed off the main thread, reducing the risk of blocking the server's main thread and improving performance.PR Checklist