Solved How do I rise a block in Y axis every x seconds?

Discussion in 'Plugin Development' started by Aypro, Jan 16, 2021.

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

    Aypro

    So, I wanna rise a block in the Y axis every 10 seconds but I cant seem to make it work.
     
  2. Offline

    Kars

    PHP:
    Bukkit.getScheduler().scheduleSyncRepeatingTask(plugin, new Runnable() {
        @
    Override
        
    public void run() {
            
    // rise 1 block
        
    }
    }, 
    0L200L); //0 Tick initial delay, 200 Tick (10 seconds) between repeats
     
    Aypro likes this.
  3. Offline

    marcelo.mb

    @Aypro As @Kars already wrote that's how you loop through. The rest should be self-explained.
    Please mark this thread as solved if you do not have any questions left.
     
Thread Status:
Not open for further replies.

Share This Page