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

Idek the error in my code...

Comments in 'Plugin Development' started by PalkiaDudeYT, Nov 8, 2015.

  1. PalkiaDudeYT
    Offline

    PalkiaDudeYT New Member

    Joined:
    Aug 30, 2015
    Posts:
    33
    Minecraft User:
    PalkiaDude
    Tell me whats wrong:
    PocketMine-MP Crash Dump Sun Nov 8 00:02:08 UTC 2015

    Error: Class PalkiaDude\Main not found
    File: /src/spl/BaseClassLoader
    Line: 131
    Type: notice

    THIS CRASH WAS CAUSED BY A PLUGIN

    Code:
    [122] *
    [123] * @return bool
    [124] */
    [125] public function loadClass($name){
    [126] $path = $this->findClass($name);
    [127] if($path !== \null){
    [128] include($path);
    [129] if(!\class_exists($name, \false) and !\interface_exists($name, \false) and !\trait_exists($name, \false)){
    [130] if($this->getParent() === \null){
    [131] throw new ClassNotFoundException("Class $name not found");
    [132] }
    [133] return \false;
    [134] }
    [135]
    [136] if(\method_exists($name, "onClassLoaded") and (new ReflectionClass($name))->getMethod("onClassLoaded")->isStatic()){
    [137] $name::eek:nClassLoaded();
    [138] }
    [139]
    [140] $this->classes[] = $name;
    [141]

    Backtrace:
    #0 (): spl_autoload_call(string PalkiaDude\Main)
    #1 /src/pocketmine/plugin/PharPluginLoader(64): class_exists(string PalkiaDude\Main, boolean 1)
    #2 /src/pocketmine/plugin/PluginManager(152): pocketmine\plugin\PharPluginLoader->loadPlugin(string /storage/emulated/0/PocketMine/plugins/phar_PalkiasPVPAddOn-master_bENkaos1cO7L3bq.phar)
    #3 /src/pocketmine/plugin/PluginManager(296): pocketmine\plugin\PluginManager->loadPlugin(string /storage/emulated/0/PocketMine/plugins/phar_PalkiasPVPAddOn-master_bENkaos1cO7L3bq.phar, array Array())
    #4 /src/pocketmine/Server__32bit(1633): pocketmine\plugin\PluginManager->loadPlugins(string /storage/emulated/0/PocketMine/plugins/)
    #5 /src/pocketmine/PocketMine(464): pocketmine\Server->__construct(pocketmine\CompatibleClassLoader object, pocketmine\utils\MainLogger object, string phar:///storage/emulated/0/PocketMine/PocketMine-MP.phar/, string /storage/emulated/0/PocketMine/, string /storage/emulated/0/PocketMine/plugins/)
    #6 (1): require(string phar:///storage/emulated/0/PocketMine/PocketMine-MP.phar/src/pocketmine/PocketMine.php)

    PocketMine-MP version: 1.6dev #30 [Protocol 34; API 1.13.0]
    Git commit: 0000000000000000000000000000000000000000
    uname -a: Linux localhost 3.4.0-3215177 #1 SMP PREEMPT Thu Nov 6 17:48:34 KST 2014 armv7l
    PHP Version: 5.6.2
    Zend version: 2.6.0
    OS : Linux, android

    Loaded plugins:
    SimpleAuth 1.7.1 by PocketMine Team, shoghicp for API(s) 1.12.0
    SimpleAuthHelper 2.0.4 by aliuly for API(s) 1.12.0
    Slapper 1.2.5 by jojoe77777 for API(s) 1.12.0
    ManyWorlds 2.0.3 by aliuly for API(s) 1.10.0
    EconomyAPI 2.0.9 by onebone for API(s) 1.0.0, 1.1.0, 1.2.0, 1.2.1, 1.3.0, 1.3.1, 1.4.0, 1.4.1
    EconomyAuction 2.0.2 by onebone for API(s) 1.0.0, 1.1.0, 1.2.0, 1.2.1, 1.3.0, 1.3.1, 1.4.0, 1.4.1
    EconomyCasino 2.0.2 by onebone for API(s) 1.0.0, 1.1.0, 1.2.0, 1.2.1, 1.3.0, 1.3.1, 1.4.0, 1.4.1
    EconomyJob 2.0.4 by onebone for API(s) 1.0.0, 1.1.0, 1.2.0, 1.2.1, 1.3.0, 1.3.1, 1.4.0, 1.4.1
    EconomyLand 2.0.9 by onebone for API(s) 1.12.0
    EconomyProperty 2.0.6 by onebone for API(s) 1.12.0
    EconomyPShop 2.0.2 by onebone for API(s) 1.12.0
    EconomySell 2.0.7 by onebone for API(s) 1.12.0
    EconomyShop 2.0.7 by onebone for API(s) 1.12.0
    EconomyTax 2.0.3 by onebone for API(s) 1.0.0, 1.1.0, 1.2.0, 1.2.1, 1.3.0, 1.3.1, 1.4.0, 1.4.1
    EconomyUsury 1.0.1 by onebone for API(s) 1.12.0
    TapToDo 2.2.1 by Falk for API(s) 1.0.0
    WorldEditArt 1.0.0_beta_dev_#048 by PEMapModder for API(s) 1.0.0

    ----------------------REPORT THE DATA BELOW THIS LINE-----------------------

    ===BEGIN CRASH DUMP===
    eNrtWwtz2ziS/itYOVUrb4mSqIdla0qp8znO7tzZiS52LlU3nHJBJCgyJgmGAC1rpvLfr7sBPiQ7
    EzuT2tm7GtdMTOLR/fUD3Q2A/rWj41R05u5kcnQyGZ6MjnudhCt9XhSy6Mx/7ehtDt2dTOrYF51e
    JxVK8TU2ncE4xZY8uY35qzIQnnfJ44zBSBbKMgtgcFgmyes4wdF5xIv5YDBQWhYwfyDSMuFaBIPh
    YCn9W6Ev40y0Hp3LZR/nDFThD1SeDP6dK0EsLyQPRAGdOXIw1L80CkYkQAzkG7u9ji44yDD/qXMw
    ZN3DOYMJN7zUMoGxNz5Pkq7SRZytHwh1CHQOXEZccoKYIto8KddxNlgCzCU9GqbdowkQ9xHFjbiP
    lVZfottjKykTwTPmEovRF1nQr0uegeqKrjsdAYNmlOeZYZ63D8V5ibKZlgrEV0xgSKkBKv/GAFbL
    /16eBsHbzEnBNURxszp/c8ulcv23s4vx6hMZigQYP02A0cnRlwRoj/snou8xXhR8y07x3+4hCTN5
    IMyVKO6AwM14tIp11z0aj58rhnqmHARk+gBIM7I7IW9rgzAonZc3N77MgF3p6267/0ymOdfxKmmv
    FCZXH4WvezuUSh0nyrjqhVyvW6OsFN+8qmsKX5n61HE7+jpiXRd0UohPZVyI7u/F+kXdYww67Pz8
    udcR3ydcPj2YAU8jcmcOBha9ji8DgQDc0QhIMPz5G0xwR+P6lf1bIXRZZBR0qG9S9w3ofWrf83KV
    xD4Ly8zXscwY+i8B6b7IeCoOf6XRR9Vs+HkBHhWxBXuho1g5L8M425nwA02YtSbEYdfM+ctiwTwv
    g0xhyR63RtHIzE9AX2a4pXSyPybs/sXzdkIuMe4B6ZAnShwyngUMxsQZhIAQ8sBXxkGuiPUXx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3A/Do4BZCtVfZS4EzJrQ+EXuvh3NejUmGBq+feMgQqtjHHJ7xnf1wvsgXzKD40/7NqC
    nPQdD+JStaZZO3CLjhapmWr9DsdDtYIxCU/m7IFPAxC22oIbJnQ02GRBA7zZ2FXY+w/B2/i34THt
    0WE/XgprXzuflj21OwqMNWfH30Qtl7n59g51Y54xNe0R9jJakw5oD0Gb80eH/EihJlGVKX7hiEcu
    ttW14QGP6+bMFHeVSfFD2zKHYsdUfMYhKXiYQsPSAioznGUZItEpvm44MqobqY2nqxg83wyxJ4Vm
    jz43wQiPEwquImZaTY61TmK811bydXBDv3bwgGe3pU4nO615lMdZKBs3wM/95oZlv3XeB4UQ4ctk
    tk2xzKcVokC/qgaK+xbbzZpuAgy+xhlfryH72MOB+tgFa0T8rvr2cWkMHiSnHsOD+jKuTCbenw0+
    YXrnxgBF5tjk3FSA1Crz1oHRGZ4Z0iGWSGSO2arH8EoDD1sAiS3FoDIJoVIWoGzITxnmeRxkU6s5
    l+VtIsxek7RqiBIKTqVNgqsCnqWGFjLdFX21p5TNZvOYSpIY0o2xyvk9x3xrXrBgAfoWxLxCQ13g
    7LhTnrOf8NGBJNOjrfPPSNFEwaoMaZ+2khDVfsFs2qpjd9qNPXZ4S5tbymKKKgYUO4VCIgagNsW3
    oBNXAkBPDE/pcelSSmq4zdnri9Pr+eiHWW96cu/2xvfj3ugH94cAMrGJWl28rfExwiyOh2wN/q3M
    22R6SIfb4l6LDBVCn9mdQR5qfa+KLtR6hXSwrq+och+H2hf1KYm1GJtPah3z+e4v5htbc0m78qGu
    ierxeHCaBbxoGszfE1VvZZHUL2GcaPyOEUi75uY31Hndu06b5whWr7mMg0EfVf2BI94vpitzllsP
    hppwm+tGAs0RUNAS92p5QVzxOfehlmvmbkFg+pTXPrEp3tK6KDlz8LZqNJwOx/D44kewWziejQWf
    BsF0Oj6eHbmT4RE/Ho5GfLI65uPZZOIer0aToWAvgBP+KULrq41cqvi+UbrdrNsBLgra/LEJtBK/
    YzENfQ6V6gTYDsPZzJ8dHx9Np8B6fDIai/FwdTI7CQLip6JUNipUtLDUrqSxUT4M1vJWZJBnirrl
    g+C3EBGMouhT0i2nSxK8pscBv8S5eRv1J53Pn/8X3+YzCw==
    ===END CRASH DUMP===
  2. CraftYourBukkit
    Offline

    CraftYourBukkit Notable Member Plugin Developer

    Joined:
    Jan 20, 2015
    Posts:
    1,022
    Plugins:
    2
    Minecraft User:
    CraftYourBukkit
    You either put the wrong main path in your plugin.yml or set the namespace in it wrong.
  3. Gamecrafter
    Offline

    Gamecrafter

    Joined:
    Nov 20, 2014
    Posts:
    978
    Plugins:
    9
    Learn how to put your code/crash dump in code blocks please... And learn how to read the error: Class PalkiaDude\Main not found Make sure the paths are correct, and check your plugin.yml.
  4. PalkiaDudeYT
    Offline

    PalkiaDudeYT New Member

    Joined:
    Aug 30, 2015
    Posts:
    33
    Minecraft User:
    PalkiaDude
    The plugin.yml and namespace are the same but its not working for some reason...
  5. Gamecrafter
    Offline

    Gamecrafter

    Joined:
    Nov 20, 2014
    Posts:
    978
    Plugins:
    9
    Try posting your code and the plugin.yml.
  6. PalkiaDudeYT
    Offline

    PalkiaDudeYT New Member

    Joined:
    Aug 30, 2015
    Posts:
    33
    Minecraft User:
    PalkiaDude
    Code:
    namespace PalkiaDude;
    use pocketmine\event\entity\EntityDamageByEntityEvent;
    use pocketmine\Server;
    use pocketmine\plugin\PluginBase;
    use pocketmine\event\Listener;
    use pocketmine\Player;
    class Main extends PluginBase implements Listener{
    public function onEnable(){
    $this->getServer()->getPluginManager()->registerEvents($this, $this);
    $this->getLogger()->info(TextFormat::GREEN . "SUPER POWAS ACTIVATED!!");
    }
    public function Hurt(EntityDamageByEntityEvent $event){
    $killer = $event->getDamager();
    $Victim = $event->getEntity();
    if($killer->getItem()->getId() == 276 or 267){
    $event->$killer->setHealth(1);
    $event->$Victim->setOnFire(5);
    }
    }
    }

    The plugin.yml:
    name: PalkiaPVPAddOn
    author: PalkiaDude
    version: 1.0
    api: [1.13.0]
    description: "New PVP Addon!"
    main: PalkiaDude\Main
  7. Gamecrafter
    Offline

    Gamecrafter

    Joined:
    Nov 20, 2014
    Posts:
    978
    Plugins:
    9
    Didn't you read my last post? Use code blocks. And both seem to look right, make sure the folder itself is correct set up. Is PalkiaDude\Main inside a folder called src\?
  8. PalkiaDudeYT
    Offline

    PalkiaDudeYT New Member

    Joined:
    Aug 30, 2015
    Posts:
    33
    Minecraft User:
    PalkiaDude
    1. How do I get the code blocks?
    2.Yea it is.
  9. Hotshot_9930
    Offline

    Hotshot_9930 Notable Member Plugin Developer

    Joined:
    May 26, 2014
    Posts:
    665
    Plugins:
    2
    Minecraft User:
    HotshotHD
    [code ] Your text here[/code]
    PalkiaDudeYT likes this.
  10. PalkiaDudeYT
    Offline

    PalkiaDudeYT New Member

    Joined:
    Aug 30, 2015
    Posts:
    33
    Minecraft User:
    PalkiaDude
    Thanks!
  11. PalkiaDudeYT
    Offline

    PalkiaDudeYT New Member

    Joined:
    Aug 30, 2015
    Posts:
    33
    Minecraft User:
    PalkiaDude
    Sooo
  12. BalAnce
    Offline

    BalAnce Active Member

    Joined:
    Mar 10, 2015
    Posts:
    125
    Minecraft User:
    BalAnce
    put the main.php in src/PalkiaDude/main.php
  13. Artide
    Offline

    Artide Active Member

    Joined:
    Apr 20, 2015
    Posts:
    214
    Minecraft User:
    Artide5
    .-.
    Code:
    if($killer->getItem()->getId() == 276 or 267){}
    its like this:
    Code:
    if($killer->getInventory()->getItemInHand()->getId() === 276 or $killer->getInventory()->getItemInHand()->getId() === 267){#your code...}
    Last edited: Nov 8, 2015
  14. PalkiaDudeYT
    Offline

    PalkiaDudeYT New Member

    Joined:
    Aug 30, 2015
    Posts:
    33
    Minecraft User:
    PalkiaDude
    did not help

Share This Page

Advertisement