1. The forums will be archived and moved to a read only mode in about 2 weeks (mid march).

TaskAPI: create and manage pocketmine tasks

Discussion in 'Off-Topic' started by xBeastMode, Dec 15, 2016.

  1. xBeastMode

    xBeastMode Shog Chips

    Messages:
    0
    Hello, this is a simple plugin api that helps you create and manage plugins easily. This task API uses more tasks from the pocketmine API to manage the tasks. This is good for: minigames, delayed massages, tips, etc.
    This is more for beginners that don't know how to create tasks, or for lazy developers. :p

    The documentation: https://github.com/xBeastMode/TaskAPI/wiki/Documentation
    Task API: https://github.com/xBeastMode/TaskAPI
    Download: https://github.com/xBeastMode/TaskAPI/releases/download/1.0/TaskAPI_v1.phar
    Releases: https://github.com/xBeastMode/TaskAPI/releases/
     
  2. InspectorGadget

    InspectorGadget Zombie Pigman

    Messages:
    462
    GitHub:
    InspectorGadget
    Looks great :)
     
  3. SOFe

    SOFe Administrator Staff Member PMMP Team Poggit Admin

    Messages:
    1,968
    GitHub:
    sof3
    All that you are doing can be simply changed to creating a CallbackPluginTask. I don't think this is helpful in any ways.
     
  4. InspectorGadget

    InspectorGadget Zombie Pigman

    Messages:
    462
    GitHub:
    InspectorGadget
    Maybe a normal Task work?
     
  5. SOFe

    SOFe Administrator Staff Member PMMP Team Poggit Admin

    Messages:
    1,968
    GitHub:
    sof3
    Why don't you just make a CallbackPluginTask? You are writing a lot of useless code that eventually just run one line of code.
     
  6. xBeastMode

    xBeastMode Shog Chips

    Messages:
    0
    I thought callback plugintask was deprecated. What if the callback is running more than one line?
     
  7. SOFe

    SOFe Administrator Staff Member PMMP Team Poggit Admin

    Messages:
    1,968
    GitHub:
    sof3
    What?
    There had never been a CallbackPluginTask. There is just a CallbackTask, and it has never been intended for anything other than internal use.
    What's wrong with the allback running more than one line? Callbacks always accept callable values, i.e. "function_name", [$object, "method_name"], or function(){ closure_code; }. It is never limited to one line of code.
     
  8. xBeastMode

    xBeastMode Shog Chips

    Messages:
    0
    call_user_func() accepts closures. :)
     
  9. SOFe

    SOFe Administrator Staff Member PMMP Team Poggit Admin

    Messages:
    1,968
    GitHub:
    sof3
    This is irrelevant to what I am talking about.
     
  10. xBeastMode

    xBeastMode Shog Chips

    Messages:
    0
    So is a CallbackPluginTask a task you have to create on your own? I don't see one in the pocket mine scheduler.
     
  11. falk

    falk Slime Poggit Reviewer

    Messages:
    75
    GitHub:
    falkirks
    unPauseTask really should be resumeTask, just saying...
     
  12. xBeastMode

    xBeastMode Shog Chips

    Messages:
    0
    You're right. xD
     
  13. SOFe

    SOFe Administrator Staff Member PMMP Team Poggit Admin

    Messages:
    1,968
    GitHub:
    sof3
    I don't see the point of this "library" except the purpose of stopping people from learning basic class hierarchy concept through writing so many lines of code to replace two lines of code.
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.