Solved Why does registerEvent cause an Error?

Discussion in 'Help' started by GeistFan, Nov 19, 2022.

  1. GeistFan

    GeistFan Slime

    Messages:
    84
    GitHub:
    GeistFan
    Hey, i coded a plugin but every time i start it, it says:
    pocketmine\plugin\PluginManager::registerEvent(): Argument #1 ($event) must be of type string
    Here is the code:
    Code:
        public function onEnable(): void
        {
            $this->getLogger()->getInfo("ForeverCMD is activated!");
            $this->getServer()->getPluginManager()->registerEvent($this, $this);
            @mkdir($this->getDataFolder());
            $this->saveDefaultConfig();
            $this->getResource("config.yml");
        }
     
  2. Kaka_Byba

    Kaka_Byba Creeper

    Messages:
    3
    registerEvents
     
  3. GeistFan

    GeistFan Slime

    Messages:
    84
    GitHub:
    GeistFan
    Ah, didn't coded for some time so
     

Share This Page

  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.