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

Error: "Call to undefined method pocketmine\Server::getScheduler()"

Discussion in 'Development' started by Miles Choularton, Apr 19, 2019.

  1. Miles Choularton

    Miles Choularton Spider

    Messages:
    8
    GitHub:
    milescholly21
    Error: "Call to undefined method pocketmine\Server::getScheduler()" (EXCEPTION) in "plugins/ModBanSystem-master/src/ModBanSystem/Main" at line 31

    i get this error every time i try to load my plugin up, i'm not the best with plugins so please try to help giving details as simplified as possible.

    line 30 and 31:

    $this->getServer()->getPluginManager()->registerEvents($this, $this);
    $this->getServer()->getScheduler()->scheduleRepeatingTask(new CountTask($this), 20);
     
  2. Zach1603

    Zach1603 Spider Jockey

    Messages:
    27
    GitHub:
    zedstar16
  3. Miles Choularton

    Miles Choularton Spider

    Messages:
    8
    GitHub:
    milescholly21
    Fatal error: Class 'pocketmine\scheduler\PluginTask' not found in C:\Users\miles\Desktop\MILES OWN SERVER\plugins\ModBanSystem-master\src\ModBanSystem\CountTask.php on line 7

    now look
     
  4. Levi

    Levi Skeleton

    Messages:
    955
    GitHub:
    captainleviftw
    change PluginTask to Task
    PHP:
    use pocketmine\scheduler\Task
     
  5. Miles Choularton

    Miles Choularton Spider

    Messages:
    8
    GitHub:
    milescholly21
    now i get this error for each command used ingame

    [Server thread/CRITICAL]: ErrorException: "Undefined offset: 1" (EXCEPTION) in "plugins/ModBanSystem-master/src/ModBanSystem/Main" at line 127
     
  6. Levi

    Levi Skeleton

    Messages:
    955
    GitHub:
    captainleviftw
    Always check if argument is set before doing something
    PHP:
    if(isset($args[1]){}
     
  7. Miles Choularton

    Miles Choularton Spider

    Messages:
    8
    GitHub:
    milescholly21
    can u fix it for me? like ill send the file on discord or something. i rly cant do this
     
  8. Levi

    Levi Skeleton

    Messages:
    955
    GitHub:
    captainleviftw
    I think that your plugin needs updating
     
  9. Levi

    Levi Skeleton

    Messages:
    955
    GitHub:
    captainleviftw
    Send here
     
  10. Miles Choularton

    Miles Choularton Spider

    Messages:
    8
    GitHub:
    milescholly21
    can't it says it has a unallowed extension
     
  11. Miles Choularton

    Miles Choularton Spider

    Messages:
    8
    GitHub:
    milescholly21
  12. SOFe

    SOFe Administrator Staff Member PMMP Team Poggit Admin

    Messages:
    1,968
    GitHub:
    sof3
    HimbeersaftLP and Levi like this.
  13. Miles Choularton

    Miles Choularton Spider

    Messages:
    8
    GitHub:
    milescholly21
  14. Levi

    Levi Skeleton

    Messages:
    955
    GitHub:
    captainleviftw
  15. Miles Choularton

    Miles Choularton Spider

    Messages:
    8
    GitHub:
    milescholly21
    Used that before and I don’t really like it at all. I’d rather use modban system but it’s broken and I can’t fix
     
  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.