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

Main class not found

Discussion in 'Development' started by Brant, Mar 12, 2020.

  1. Brant

    Brant Baby Zombie

    Messages:
    104
    GitHub:
    tetroyt
    im having another brain fart with Main class not found

    Plugin.yml:

    Code:
    name: CustomPotions
    main: TetroYT\CustomPotions\Main
    api: [3.0.0]
    version: 1.0
    author: TetroYT
    permissions:
     cp.cp:
      default: true
    Main:

    PHP:
    <?php

    declare(strict_types=1);

    namespace 
    Main;

    use 
    CustomPotions\commands\CustomPotionsCommand;
    The folders:
     

    Attached Files:

  2. HimbeersaftLP

    HimbeersaftLP Fish

    Messages:
    2,402
    GitHub:
    HimbeersaftLP
    Your namespace should be
    TetroYT\CustomPotions and your class should be called Main.
    Also your use statement didn't have the full namespace
    PHP:
    <?php

    declare(strict_types=1);

    namespace 
    TetroYT\CustomPotions;

    use 
    pocketmine\plugin\PluginBase;
    use 
    TetroYT\CustomPotions\commands\CustomPotionsCommand;

    class 
    Main extends PluginBase {

    }
     
  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.