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

ClassNotFoundException CallbackTask

Discussion in 'Development' started by Gold, Dec 4, 2016.

Thread Status:
Not open for further replies.
  1. xBeastMode

    xBeastMode Shog Chips

    Messages:
    0
    It can be considered old because callback task was deprecated long ago as @dktapps said .
     
  2. Gold

    Gold Silverfish

    Messages:
    23
    GitHub:
    goldcodes
    What can I do to fix it?
     
  3. xBeastMode

    xBeastMode Shog Chips

    Messages:
    0
    I wouldn't recommend fixing it, but if you switched the callback task to a plugin task and remove all the callable functions.
     
  4. Gold

    Gold Silverfish

    Messages:
    23
    GitHub:
    goldcodes
    Noob I am. What is a callable function
     
  5. KnownUnown

    KnownUnown Spider Jockey Poggit Reviewer

    Messages:
    47
    GitHub:
    knownunown
  6. Gold

    Gold Silverfish

    Messages:
    23
    GitHub:
    goldcodes
    I keep getting a
    error. I do not know what is going on.
     
  7. aliuly

    aliuly Silverfish

    Messages:
    23
    GitHub:
    alejandroliu
  8. SOFe

    SOFe Administrator Staff Member PMMP Team Poggit Admin

    Messages:
    1,968
    GitHub:
    sof3
    xBeastMode likes this.
  9. Primus

    Primus Zombie Pigman

    Messages:
    749
    Libraries GO!
    An abstract class is meant to be extended and not constructed directly. These types of classes are holding a set of rules which extending classes must obey. If you know what is an interfaces then it's easier to think about this: you can't create a instance of interface. Don't wait for answers that has been already given, let me google that for you.

    an off-topic: lmgtfy is making a real big deal of their existence, they even got stickers.
     
    SOFe likes this.
  10. Gold

    Gold Silverfish

    Messages:
    23
    GitHub:
    goldcodes
    Now I dont know what to do; i'm very confused with all this pluginTask stuff
    Screenshot 2016-12-06 at 9.52.57 PM.png Screenshot 2016-12-06 at 9.52.43 PM.png
     
  11. LilCrispy2o9

    LilCrispy2o9 Spider Jockey

    Messages:
    43
    GitHub:
    lilcrispy2o9
    You need to add a construct function to the SAT class.
     
  12. Gold

    Gold Silverfish

    Messages:
    23
    GitHub:
    goldcodes
    What would I construct? Screenshot 2016-12-06 at 10.09.23 PM.png
     
  13. LilCrispy2o9

    LilCrispy2o9 Spider Jockey

    Messages:
    43
    GitHub:
    lilcrispy2o9
  14. Gold

    Gold Silverfish

    Messages:
    23
    GitHub:
    goldcodes
    Server keeps crashing Screenshot 2016-12-06 at 10.21.21 PM.png Screenshot 2016-12-06 at 10.21.07 PM.png
     
  15. LilCrispy2o9

    LilCrispy2o9 Spider Jockey

    Messages:
    43
    GitHub:
    lilcrispy2o9
  16. Gold

    Gold Silverfish

    Messages:
    23
    GitHub:
    goldcodes
    Now It says that?
    Screenshot 2016-12-06 at 10.31.58 PM.png Screenshot 2016-12-06 at 10.32.31 PM.png
     
  17. LilCrispy2o9

    LilCrispy2o9 Spider Jockey

    Messages:
    43
    GitHub:
    lilcrispy2o9
    Wait for me to get home or someone else to help you. If I get the chance I'll write the full code for you this time. Take a look at the error and the API and try to make sense of it.
     
  18. LilCrispy2o9

    LilCrispy2o9 Spider Jockey

    Messages:
    43
    GitHub:
    lilcrispy2o9
    Try this
    PHP:
    class SAT extends PluginTask {
        public 
    $owner;
        public function 
    __construct(Main $owner) {
            
    $this->owner $owner;
        }

        public function 
    onRun($currentTick) {
            
    //code goes  here
        
    }
    }
     
  19. robske_110 (Tim)

    robske_110 (Tim) Wither Skeleton Poggit Reviewer

    Messages:
    1,342
    GitHub:
    robske110
    :facepalm:
    You need to add
    parent::__construct($owner); in your construct function. If you do not know why, learn how the task system in pocketmine works.
     
  20. LilCrispy2o9

    LilCrispy2o9 Spider Jockey

    Messages:
    43
    GitHub:
    lilcrispy2o9
    Oops I completely forgot about that. I typed that while stuffing my face with a burrito aha.
     
Thread Status:
Not open for further replies.
  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.