#BukkitScheduler async tasks question

1 messages · Page 1 of 1 (latest)

keen temple
#

Hello, I've noticed in the bukkit scheduler class that any tasks that are run asynchronously should not access Bukkit api. But, how can I 'return' to the server thread? For example, a player opens a chest and then a plugin on a server puts a item called 'loading...' in the chest, and then makes a request to some api on the internet, and then update contents of that chest based on whatever is returned from that response. If the request is made asynchronously, then obviously i shouldn't interact with the chest there. I was thinking of calling runTaskLater (that is synchronous) from the async task, is that correct?

reef fossil
#

Tes

#

Yes