Advertisement
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

[NEW API] How to get Plugin to wait?

Comments in 'Plugin Development' started by SpiderPig, Aug 16, 2014.

  1. SpiderPig
    Offline

    SpiderPig Active Member

    Joined:
    Sep 21, 2013
    Posts:
    128
    Minecraft User:
    SpiderPig
    How would I get a plugin task to wait because I remember someone saying you can't use
    PHP:
    sleep();
    ??
  2. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,325
    Plugins:
    11
    Minecraft User:
    PEMapModder
    Use plugin tasks.
    64FF00 likes this.
  3. SpiderPig
    Offline

    SpiderPig Active Member

    Joined:
    Sep 21, 2013
    Posts:
    128
    Minecraft User:
    SpiderPig
    Could I also use this
    $this->getServer()->getScheduler()->scheduleDelayedTask(new Task($this), $t)
  4. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,325
    Plugins:
    11
    Minecraft User:
    PEMapModder
    Yes, except that you have to extend the PluginTask class.

    And please delete double posts.
    64FF00 likes this.

Share This Page

Advertisement