Advertisement
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Solved ClassNotFoundException

Comments in 'Plugin Development' started by Praxthisnovcht, Dec 13, 2014.

  1. Praxthisnovcht
    Offline

    Praxthisnovcht Notable Member Plugin Developer

    Joined:
    Mar 10, 2014
    Posts:
    699
    Plugins:
    4
    Minecraft User:
    PraxHellTag
    Hi guys, I not find my mistake it: O

    [​IMG]

    PHP:
    nameNextLevel
    version
    1.0.4
    api
    1.6.0
    main
    Praxthisnovcht\NextLevel
    depend
    : [CustomChat]
    PHP:
    <?php

    namespace Praxthisnovcht\NextLevel;



    use 
    pocketmine\command\Command;
    use 
    pocketmine\command\CommandSender;
    use 
    pocketmine\plugin\PluginBase;
    use 
    pocketmine\utils\TextFormat;
    use 
    pocketmine\item\item;


    /**
    * NextLevel
    */
    class NextLevel extends PluginBase {,
        public function 
    onLoad() {
       
        }
    \
    plugin\PluginBase::onEnable()
         */
        public function 
    onEnable() {
            
    $this->enabled true;
            
    $this->getServer()->getPluginManager()->registerEvents(new NextLevelListener($this), $this);
            
    $this->log TextFormat::GREEN "- NextLevel - Enabled!" );
            
    $this->loadConfig ();
        }
        public function 
    onDisable() {
            
    $this->log TextFormat::RED "NextLevel - Disabled" );
            
    $this->enabled false;
        }
         }
  2. xFlare
    Offline

    xFlare Active Member Plugin Developer

    Joined:
    Sep 28, 2014
    Posts:
    199
    Plugins:
    1
    Minecraft User:
    xFlare
    For the name space try to get rid of "Praxthisnovcht"

    namespace NextLevel;
    EvolSoft likes this.
  3. Praxthisnovcht
    Offline

    Praxthisnovcht Notable Member Plugin Developer

    Joined:
    Mar 10, 2014
    Posts:
    699
    Plugins:
    4
    Minecraft User:
    PraxHellTag
    PHP:
    19:38:20 [WARNINGRuntimeException"Couldn't load source plugin NextLevel: main class not found" (E_USER_WARNINGin "/DevTools_v1.8.0-4c37f602.phar/src/FolderPluginLoader/FolderPluginLoader" at line 72
    adding a space to each nail
  4. EvolSoft
    Offline

    EvolSoft Notable Member Plugin Developer

    Joined:
    Sep 10, 2014
    Posts:
    821
    Plugins:
    15
    Minecraft User:
    Flavius12
    Can you post the plugin folder structure?
  5. Praxthisnovcht
    Offline

    Praxthisnovcht Notable Member Plugin Developer

    Joined:
    Mar 10, 2014
    Posts:
    699
    Plugins:
    4
    Minecraft User:
    PraxHellTag
  6. EvolSoft
    Offline

    EvolSoft Notable Member Plugin Developer

    Joined:
    Sep 10, 2014
    Posts:
    821
    Plugins:
    15
    Minecraft User:
    Flavius12
    Try to change this in your plugin.yml file:
    PHP:
    mainPraxthisnovcht\NextLevel\NextLevel
    Please like if I helped you :)
    hoyinm14mc, PEMapModder and xFlare like this.
  7. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    What? He should fix it in plugin.yml instead.

    And there are so many syntax errors in your script.
  8. Praxthisnovcht
    Offline

    Praxthisnovcht Notable Member Plugin Developer

    Joined:
    Mar 10, 2014
    Posts:
    699
    Plugins:
    4
    Minecraft User:
    PraxHellTag
    need help indeed =)
  9. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    Get a good IDE and it will tell you everything.
    Dinokiller and EvolSoft like this.
  10. iksaku
    Offline

    iksaku Notable Member Plugin Developer

    Joined:
    Sep 2, 2013
    Posts:
    1,130
    Plugins:
    4
    Minecraft User:
    iksaku
    Add the name space, and finally the CLASS NAME, for example:

    PHP:
    namespace NextLevel
    class 
    Test 
    In the plugin.yml use:

    main: NextLevel\Test
  11. Falk
    Offline

    Falk Staff Member Global Moderator

    Joined:
    Sep 2, 2013
    Posts:
    1,706
    Plugins:
    22
    Minecraft User:
    Falkirknh
    Keep in mind that namespaces should be all lowercase if you want to prevent people from crying whilst looking at your code.
    Andrey Nazarchuk likes this.
  12. Praxthisnovcht
    Offline

    Praxthisnovcht Notable Member Plugin Developer

    Joined:
    Mar 10, 2014
    Posts:
    699
    Plugins:
    4
    Minecraft User:
    PraxHellTag
    this thing is dropped.
    must continue to learn to do one thing really clean
  13. Andrey Nazarchuk
    Offline

    Andrey Nazarchuk Active Member

    Joined:
    Dec 30, 2013
    Posts:
    332
    Minecraft User:
    digita1eclipse
    I have the same issue and none of what you guys said helped.
    HyperFuse likes this.
  14. Praxthisnovcht
    Offline

    Praxthisnovcht Notable Member Plugin Developer

    Joined:
    Mar 10, 2014
    Posts:
    699
    Plugins:
    4
    Minecraft User:
    PraxHellTag
    this topic is long past
    no need to respond.
    if this is to say that the "TAG" resolved is not displayed.
    it's just that it does not exist
  15. Taki21
    Offline

    Taki21 New Member

    Joined:
    Sep 24, 2015
    Posts:
    11
    Minecraft User:
    Taki21
    ok i didnt notice! Sorry!:p
  16. Praxthisnovcht
    Offline

    Praxthisnovcht Notable Member Plugin Developer

    Joined:
    Mar 10, 2014
    Posts:
    699
    Plugins:
    4
    Minecraft User:
    PraxHellTag
    PHP:
    use pocketmine\Server
    has nothing to do with it
  17. Taki21
    Offline

    Taki21 New Member

    Joined:
    Sep 24, 2015
    Posts:
    11
    Minecraft User:
    Taki21

Share This Page

Advertisement