Can I make a delay in a for loop?

Discussion in 'Plugin Development' started by samyyc, Sep 19, 2020.

Thread Status:
Not open for further replies.
  1. Offline

    samyyc

    I am writing a plugin and I need to make a delay for a particle effect, please help me , thanks!!
     
  2. Offline

    Strahan

    No. The server is primarily single threaded, if you do something like Thread.sleep it will freeze the entire server. Use a runnable if you need to run things with variable time delays.
     
  3. Offline

    samyyc

    thanks for help, I try to use runnable but i cant make my variables as final
     
  4. Offline

    Kars

    @samyyc so don't use final variables?
     
Thread Status:
Not open for further replies.

Share This Page