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

another question

Comments in 'Plugin Development' started by PalkiaDudeYT, Sep 23, 2016.

  1. PalkiaDudeYT
    Offline

    PalkiaDudeYT New Member

    Joined:
    Aug 30, 2015
    Posts:
    33
    Minecraft User:
    PalkiaDude
    Is there an event for when a task has finished?
  2. CraftYourBukkit
    Offline

    CraftYourBukkit Notable Member Plugin Developer

    Joined:
    Jan 20, 2015
    Posts:
    1,022
    Plugins:
    2
    Minecraft User:
    CraftYourBukkit
    A task has finished in the last line of onRun(). What do you need this for?
    PocketKiller likes this.
  3. Ragnok1234
    Offline

    Ragnok1234 Active Member

    Joined:
    Jul 18, 2016
    Posts:
    53
    Minecraft User:
    Ragnok123
    When you switch task, you can write case 0:
  4. Primus
    Offline

    Primus Notable Member

    Joined:
    Apr 7, 2015
    Posts:
    1,470
    Minecraft User:
    PrimusLV
    Normal task includes one method
    Code:
    # onRun()
    
    You can run code on last task run differently for different task type (repeatable or delayed)

    Async task includes two methods
    Code:
    # onRun()
    # ... some functions passing result
    # onCompletion(Server server)
    
    This is self-explanatory.

Share This Page

Advertisement