Hello, so I have the code below and it works, but the problem is that my TaskBuilder executes before both of the teleportPlayersToArena method calls finish executing. Is there a way to execute the TaskBuilder after the two method calls are done? Thanks!
Reason I ask is, something in that method call, or its method calls, or its method calls, etc., would have to do something asynchronous. The synchronized keyword only means that only one thread can call the code at a time.
I’m just saying I don’t know why it would, because it doesn’t actually prevent any previously asynchronous bits of code from remaining asynchronous. synchronized code prevents more than one thread from accessing it simultaneously, but it doesn’t prevent the method itself from spawning more threads.