Hey everyone and happy new year!
This might be simple, but i can't get my head around how i'm to stop/pause a thread, and start it again after calling a method. I have been trying the following example, and it's working to some point, but breaks eventually and the threads will fail to run. I have also been reading about wait() and notifyAll(), but haven't been able to get that to work. Does anyone have some insight on this topic, that might be willing so share a snippet or give some tips?
AttackThread.interrupt();
MoveToRevenantsThread.interrupt();
teleport.run();
AttackThread = new Thread(attack);
MoveToRevenantsThread = new Thread(moveToRevenants);