[Feat] AsyncOfflinePlayerArgument#632
[Feat] AsyncOfflinePlayerArgument#632Bram1903 wants to merge 12 commits intoCommandAPI:dev/devfrom Bram1903:feat/AsyncOfflinePlayerArgument
Conversation
…AsyncOfflinePlayerArgument
Added: AsyncOfflinePlayerArgument to CommandTreeDSL & CommandAPICommandDSL
DerEchtePilz
left a comment
There was a problem hiding this comment.
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 resolved
Hide resolved
Co-authored-by: DerEchtePilz <[email protected]>
Co-authored-by: DerEchtePilz <[email protected]>
…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! |
DerEchtePilz
left a comment
There was a problem hiding this comment.
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 theSafeOverrideableArgumentclass. The new class wraps the existingOfflinePlayerArgumentwithin 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