Solved Waiting Set Number of Ticks

Discussion in 'Plugin Development' started by Zachster, Aug 7, 2013.

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

    Zachster

    Hi. I am writing a plugin and want to do something like this.

    Within an event handler do the following

    Do Thing A
    Wait A Set Number of Ticks
    Do Thing B

    I am not wanting to make this particular thing happen multiple times, just when this event is called. How do I do it? Thanks.
     
  2. Offline

    Bammerbom

    Use bukkit schedulers
     
  3. Offline

    Zachster


    How?
     
  4. Offline

    Bammerbom

    Code:java
    1.  
    2. Bukkit.getServer().getScheduler().scheduleSyncDelayedTask(plugin,
    3. new Runnable(){ public void run() {
    4. //Thing to delay
    5.  
    6. //
    7. }},
    8. ticks);
    9. }
    10.  
     
  5. Offline

    chasechocolate

  6. Offline

    Bammerbom

  7. Offline

    Zachster

    Thanks will try.
     
Thread Status:
Not open for further replies.

Share This Page