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

How to use PluginTask to countdown.

Comments in 'Plugin Development' started by RekkuzaRage, May 16, 2015.

  1. RekkuzaRage
    Offline

    RekkuzaRage Active Member

    Joined:
    Apr 15, 2014
    Posts:
    252
    Minecraft User:
    RekkuzaRage
    I am wondering on how to use PluginTask to countdown from 30 and stop.
    Example: Match starting in 30 seconds... and so on.
    64FF00 likes this.
  2. ProjectInfinity
    Offline

    ProjectInfinity Active Member Plugin Developer

    Joined:
    Sep 7, 2014
    Posts:
    112
    Plugins:
    3
    Minecraft User:
    ProjectInfinity
    You can simply schedule a sync repeat task that runs every 20 ticks. 20 ticks = 1 second.
    Store the counter in the task and when it reaches 0 cancel the task.
    64FF00 likes this.
  3. RekkuzaRage
    Offline

    RekkuzaRage Active Member

    Joined:
    Apr 15, 2014
    Posts:
    252
    Minecraft User:
    RekkuzaRage
    Example, please?
  4. iJoshuaHD
    Offline

    iJoshuaHD Notable Member Plugin Developer

    Joined:
    Nov 7, 2013
    Posts:
    1,201
    Plugins:
    4
    Minecraft User:
    iJoshuaHD
    there is a lot of plugins that uses this. mind checking the sources instead? plus, next time, use the search engine provided above because i see lots of threads about this.
    64FF00 likes this.

Share This Page

Advertisement