| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
There was a problem hiding this comment.
Haven't personally tested functionality, but code looks good and makes sense to me.
I think it's fine to not include any automated tests in this PR given that OfflinePlayerArgument doesn't have any tests yet. I'm not sure how MockBukkit handles offline players, so that's something that could just be figured out later.
Sorry, something went wrong.
|
The reason I didn't include a separate unit test for this is that the OfflinePlayerArgument is already being tested in the ProfileArgumentTypeTests. This argument essentially wraps OfflinePlayerArgument into a CompletableFuture<OfflinePlayerArgument>, leveraging its existing functionality. Since the core behavior is already validated, additional tests here would be redundant. |
Sorry, something went wrong.
|
Yeah, that doesn't test the actual OfflinePlayerArgument, that tests the custom implementation we have for the test toolkit to make it NMS independent. |
Sorry, something went wrong.
Whoops, I see! Thanks for the heads up :-) |
Sorry, something went wrong.
[Feat] AsyncOfflinePlayerArgument Documentation CommandAPI/CommandAPI#633
| Back | FazBrowse Home | New Git URL |
Description
This pull request introduces the AsyncOfflinePlayerArgument, which extends the SafeOverrideableArgument class. The new class wraps the existing OfflinePlayerArgument within a CompletableFuture<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
Documentation
See CommandAPI/docs#1
This PR is in continuation of #632, which I accidentally closed :-)