Solved Delay event 1 line code

Discussion in 'Plugin Development' started by Ward1246, Jan 30, 2015.

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

    Ward1246

    I had a code that delayed a task, i can't find it anywhere and i am wondering if anyone here knows what it is/ could have been. I only remember that it was a 1 line code, that would delay a event to however long you made it and what you wanted to delay was in the code. Thank you for any help, i know this isn't a normal post but this is the only code i am looking for. It should work for 1.7.10.
     
  2. Offline

    nverdier

  3. Offline

    Ward1246

    Thank you for the quick reply, but i spoke to soon, i found it, it was:
    plugin.getServer().getScheduler().scheduleSyncDelayedTask(plugin, new Runnable() { public void run() { player.setFallDamage(0F); } }, 20 * 5); (to make this work turn plugin to this IE: this.getServer().getScheduler().scheduleSyncDelayedTask(this, new Runnable() { public void run() { player.setFallDamage(0F); } }, 20 * 5);
     
  4. Offline

    nverdier

Thread Status:
Not open for further replies.

Share This Page