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

ClassNotFoundExeption error

Discussion in 'Plugin Help' started by Bixcoitinho_, Feb 5, 2021.

  1. Bixcoitinho_

    Bixcoitinho_ Spider

    Messages:
    10
    my plugin has an error called "ClassNotFoundExeption" does anyone know what this is?

    [00:00:00] [Server thread/CRITICAL] ClassNotFoundExeption: "class LobbyCore\main not found" (EXCEPTION) in "Pocketmine-MP.phar/src/spl/BaseClassLoader" at line 131
     
  2. iDarkQ

    iDarkQ Spider

    Messages:
    12
    GitHub:
    idarkq
    Check if your class are have same name and namespace like in plugin.yml
     
  3. Bixcoitinho_

    Bixcoitinho_ Spider

    Messages:
    10
    my namespace:
    namespace LobbyCore;
    my class:
    class main extends PluginBase implements Listener {
    main.php name:
    main.php
     
  4. iDarkQ

    iDarkQ Spider

    Messages:
    12
    GitHub:
    idarkq
    try to remove .php from main path
     
  5. Bixcoitinho_

    Bixcoitinho_ Spider

    Messages:
    10
    there is no .php in the main directory look at my plugin.yml

    Code:
    name: 'LobbyCore'
    main: 'LobbyCore\main'
    version: '1.0'
    api: '[2.0.0, 3.0.0, 3.17.0]'
    author: 'BixcoitinDev'
    description: 'LobbyCore plugin'
     
  6. minijaham

    minijaham Skeleton

    Messages:
    801
    GitHub:
    minijaham
    If your classes are defined correctly, I am not sure but I’ve seen this somewhere but try changing “main” to “Main” in both plugin.yml and the main class.
     
  7. iDarkQ

    iDarkQ Spider

    Messages:
    12
    GitHub:
    idarkq
    Take a look on path ( folders ) and check if it's correct because there is no mistake ( if it does't work send here screenshot with your plugin folders )
     
    Primus likes this.
  8. Primus

    Primus Zombie Pigman

    Messages:
    749
    iirc class names are case insensitive
     
  9. minijaham

    minijaham Skeleton

    Messages:
    801
    GitHub:
    minijaham
    Last edited: Feb 7, 2021
  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.