Krypton icon indicating copy to clipboard operation
Krypton copied to clipboard

Expand the scheduling API to allow synchronous scheduling

Open BomBardyGamer opened this issue 3 years ago • 0 comments

I am unsure if this is a good idea or not, but the idea is to allow plugins to schedule things synchronously. Though I don't have any use cases in mind as I write this, and I have many good reasons against this, it may still be worth discussing, which is why I'm writing this issue.

Pros:

  • Allows plugins to do some things in sync with the server

Cons:

  • Exposes another implementation detail (that the server has ticking logic and a main thread)
  • The API is meant to be designed in a way that makes users worry less about concurrency issues, since those are a server-side issue, and focus more on the actual thing they want to do.
  • Some coming from Bukkit or Sponge may not understand that most things wouldn't need to be synchronous.
  • Increases the complexity of the scheduling API
  • There are already events that fire on tick start and end, allowing plugins to do actions in sync with the server.

BomBardyGamer avatar Dec 25 '22 18:12 BomBardyGamer