Solved I can't find a way to attach my main file to my plugin.

Discussion in 'Development' started by GreenDude2009, Jun 21, 2022.

  1. GreenDude2009

    GreenDude2009 Creeper

    Messages:
    2
    Can someone help find a way to attach my main file to my plugin? I am new to this and I couldn't find any other posts on here with the same issue. Untitled3.png
    Edit: I forgot to attach the code in Main.php so here you go:
    PHP:
    <?php

    namespace TestPlugin;
    use 
    pocketmine\plugin\PluginBase;

    class 
    MainClass extends PluginBase {
        public function 
    onLoad() : void{
            
    $this->getLogger()->info("Plugin Loading");
        }
    }
     
    Last edited: Jun 21, 2022
  2. GreenDude2009

    GreenDude2009 Creeper

    Messages:
    2
    I found out why, I had included src\ in plugin.yml, and I had to change Main.php to TestPlugin.php.
     

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.