0

I'm making Minecraft Plugin which aside from it's normal behaviour provides API for developers.

In Minecraft it's important to run blocking operations Async - so main thread will not be blocked and thus not causing lags.

In my API I have simple method which loads data from Database. This method doesn't care about what thread its executed on - I want to inform user about blocking behavior of this method and that he should run it Async (preferably via BukkitScheduler). I don't want to return CompletableFuture.

Is there any special JavaDoc item or method annotation for this purpose?

azbarcea
  • 3,323
  • 1
  • 20
  • 25
Mára Toner
  • 302
  • 2
  • 16
  • 5
    Short answer, no, there's not. You can simply say that it's blocking in the description. However, you can create custom tags as seen [here](https://stackoverflow.com/questions/2677564/how-to-create-custom-javadoc-tags). – Michael Bianconi Aug 15 '19 at 19:33
  • Alternatively, you could make the function call create a BukkitScheduler and run the command async for them. – R10t-- Aug 19 '19 at 20:53

0 Answers0