8000 [Feat] AsyncOfflinePlayerArgument by Bram1903 · Pull Request #632 · CommandAPI/CommandAPI · GitHub
[go: up one dir, main page]

Skip to content

[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

Closed
wants to merge 12 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Added: Kotlin DSL example for AsyncOfflinePlayer argument in the docu…
…mentation
  • Loading branch information
Bram1903 committed Jan 12, 2025
commit f9d925983ee9edc6028f94c8fd179b732d35312d
4 changes: 4 additions & 0 deletions docssrc/src/argument_entities.md
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,10 @@ We now want to get the `CompletableFuture<OfflinePlayer>` object from the `Async
{{#include ../../commandapi-documentation-code/src/main/kotlin/dev/jorel/commandapi/examples/kotlin/Examples.kt:argumentAsyncOfflinePlayer1}}
```

```kotlin,Kotlin_DSL
{{#include ../../commandapi-documentation-code/src/main/kotlin/dev/jorel/commandapi/examples/kotlin/ExamplesKotlinDSL.kt:argumentAsyncOfflinePlayer1}}
```

</div>

We now successfully ran a command that asynchronously checks if a player has joined the server before without blocking the main thread despite making an API call.
Expand Down
0