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

Could not load my plugin

Discussion in 'Development' started by DanielYTK, Jul 15, 2017.

  1. DanielYTK

    DanielYTK Zombie

    Messages:
    227
    I get this error when starting my server, I do not know why I get it, but could someone tell me why I'm getting this error?
    Code:
     [07:42:13] [Server thread/CRITICAL]: Could not load plugin 'Clans' 
    ps: I'm not sharing my code because I do not know which part I should share, it has never happened to me before. I tried to look for what could be causing this error in the api itself, and found nothing.
     
  2. Sandertv

    Sandertv Zombie Pigman Poggit Reviewer

    Messages:
    786
    GitHub:
    Sandertv
    Is that absolutely everything it shows on the screen?
     
  3. FAXES

    FAXES Spider Jockey

    Messages:
    45
    It's hard to tell when there is no code or description of the plugin etc...
     
    Sandertv likes this.
  4. DanielYTK

    DanielYTK Zombie

    Messages:
    227
    Yes
     
  5. DanielYTK

    DanielYTK Zombie

    Messages:
    227
    Description:
    Code:
    name: Clans
    version: 1.0
    api: [2.0.0, 3.0.0, 3.0.0-ALPHA5]
    main: DanielYTK\Clans\Main
    author: DanielYTK
    
     
  6. Irish

    Irish Baby Zombie

    Messages:
    156
    GitHub:
    irishpacks
    can you share your folder structure?
     
  7. SOFe

    SOFe Administrator Staff Member PMMP Team Poggit Admin

    Messages:
    1,968
    GitHub:
    sof3
    Try setting debug.level to 2 in pocketmine.yml and try again. You may see more info in that way.
     
    EdwardHamHam and DanielYTK like this.
  8. DanielYTK

    DanielYTK Zombie

    Messages:
    227
     

    Attached Files:

  9. DanielYTK

    DanielYTK Zombie

    Messages:
    227
    It does not show anything about the plugin that is in error.
     
  10. Irish

    Irish Baby Zombie

    Messages:
    156
    GitHub:
    irishpacks
    Check your namespace in your Main class.
     
  11. DanielYTK

    DanielYTK Zombie

    Messages:
    227
    Code:
     namespace DanielYTK\Clans;
    Is right
     
  12. DanielYTK

    DanielYTK Zombie

    Messages:
    227
    Code:
    [21:07:43] [Server thread/ERROR]: Could not load 'C:\Users\DanielYTK\Desktop\Backup\PocketMine-MP\plugins\Clas' in folder 'C:\Users\DanielYTK\Desktop\Backup\PocketMine-MP\plugins\': Argument 1 passed to pocketmine\plugin\PluginDescription::loadMap() must be of the type array, boolean given, called in phar://C:/Users/DanielYTK/Desktop/Backup/PocketMine-MP/PocketMine-MP.phar/src/pocketmine/plugin/PluginDescription.php on line 53
    [21:07:43] [Server thread/CRITICAL]: TypeError: "Argument 1 passed to pocketmine\plugin\PluginDescription::loadMap() must be of the type array, boolean given, called in phar://C:/Users/DanielYTK/Desktop/Backup/PocketMine-MP/PocketMine-MP.phar/src/pocketmine/plugin/PluginDescription.php on line 53" (EXCEPTION) in "/src/pocketmine/plugin/PluginDescription" at line 61
    
    
     
  13. DanielYTK

    DanielYTK Zombie

    Messages:
    227
    This has now appeared:
     

    Attached Files:

  14. Awzaw

    Awzaw Zombie Pigman Poggit Admin

    Messages:
    726
    GitHub:
    awzaw
    I don't know if this is the only problem you have, but you must now use a full version string such as 1.0.0 for your plugin version (even if it is in quotes!) or it will be interpreted as a float, or int if you just use '1' which then throws a type error because version must be a string. Blame yaml and strict typing... This had me confused for a while today.
     
  15. DanielYTK

    DanielYTK Zombie

    Messages:
    227
    I really do not know what can be causing this, I've never had this error before, I've tried everything I know to try to solve it. Unsuccessfully.
     
  16. SalmonDE

    SalmonDE Zombie Pigman

    Messages:
    739
    GitHub:
    SalmonDE
    Can you provide your plugin.yml file?
     
  17. SOFe

    SOFe Administrator Staff Member PMMP Team Poggit Admin

    Messages:
    1,968
    GitHub:
    sof3
    Seems like there was an error parsing your plugin.yml
     
    SalmonDE likes this.
  18. XdmingXD

    XdmingXD Baby Zombie

    Messages:
    158
    GitHub:
    xdmingxd
    Oh?
    the folder "src" is not needed now?
     
  19. Awzaw

    Awzaw Zombie Pigman Poggit Admin

    Messages:
    726
    GitHub:
    awzaw
    Have you checked the yaml is not corrupted on codebeautify.org? If so,
    did you actually try what I suggested and correct your version string to 1.0.0? Was the error message the same afterwards?

    Update, dktapps has just committed a workaround for the yaml types problem.
     
    Last edited: Jul 16, 2017
  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.