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

Please Help With Timers!!!

Comments in 'Plugin Development' started by Samueljh1, Jan 24, 2015.

  1. Samueljh1
    Offline

    Samueljh1 Active Member Plugin Developer

    Joined:
    Jan 9, 2015
    Posts:
    316
    Plugins:
    5
    Minecraft User:
    Samueljh1_
    I guys, I really need help!

    I have to do a countdown timer for my Skywars plugin.

    I've seen a lot of examples, but I don't know what the best one is!!

    Please reply with some example scripts!! :)
  2. jython234
    Offline

    jython234 Notable Member Plugin Developer

    Joined:
    Nov 4, 2013
    Posts:
    324
    Plugins:
    1
    Minecraft User:
    jython234
    Sorry that I can't really post a script right now(I'm on mobile), but you can register a task in the scheduled with 20 tick (1 second) intervals. I'm not sure how you would stop it though.
  3. Samueljh1
    Offline

    Samueljh1 Active Member Plugin Developer

    Joined:
    Jan 9, 2015
    Posts:
    316
    Plugins:
    5
    Minecraft User:
    Samueljh1_
    Yea, I tried something with that... If you do more than one, it compiles up and they all run at the same time after the total delays... If that makes sense xD
  4. jython234
    Offline

    jython234 Notable Member Plugin Developer

    Joined:
    Nov 4, 2013
    Posts:
    324
    Plugins:
    1
    Minecraft User:
    jython234
    Register them, but each have different intervals. You'd have to change the string to broadcast though.
  5. Samueljh1
    Offline

    Samueljh1 Active Member Plugin Developer

    Joined:
    Jan 9, 2015
    Posts:
    316
    Plugins:
    5
    Minecraft User:
    Samueljh1_
    Wat do u mean?
  6. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,306
    Plugins:
    11
    Minecraft User:
    PEMapModder
    Make a class that extends PluginTask and that imements the onRun() method; schedule them using $server->getScheduler()->scheduleDelayedTask().
    Falk likes this.

Share This Page

Advertisement