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

Please help :'(

Comments in 'Plugin Development' started by Kiosek, Apr 26, 2015.

  1. Kiosek
    Offline

    Kiosek New Member

    Joined:
    Jun 17, 2014
    Posts:
    34
    Minecraft User:
    Cecil107
    PocketMine-MP Crash Dump Sun Apr 26 17:07:00 BST 2015
    Error: Class Cecil107\first\MainClass not found
    File: /src/spl/BaseClassLoader
    Line: 144
    Type: notice
    THIS CRASH WAS CAUSED BY A PLUGIN
    Code:
    [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]
    [142] return \true;
    [143] }elseif($this->getParent() === \null){
    [144] throw new ClassNotFoundException("Class $name not found");
    [145] }
    [146]
    [147] return \false;
    [148] }
    [149]
    [150] /**
    [151] * Returns the path for the class, if any
    [152] *
    [153] * @param string $name
    [154] *
    Backtrace:
    #0 (): spl_autoload_call(string Cecil107\first\MainClass)
    #1 /src/pocketmine/plugin/PharPluginLoader(64): class_exists(string Cecil107\first\MainClass, boolean 1)
    #2 /src/pocketmine/plugin/PluginManager(152): pocketmine\plugin\PharPluginLoader->loadPlugin(string C:\Users\vesel_000\Desktop\PocketMine-MP\plugins\phar_plugiin_uMMD9fBUd1nd2k7.phar)
    #3 /src/pocketmine/plugin/PluginManager(296): pocketmine\plugin\PluginManager->loadPlugin(string C:\Users\vesel_000\Desktop\PocketMine-MP\plugins\phar_plugiin_uMMD9fBUd1nd2k7.phar, array Array())
    #4 /src/pocketmine/Server(1676): pocketmine\plugin\PluginManager->loadPlugins(string C:\Users\vesel_000\Desktop\PocketMine-MP\plugins\)
    #5 /src/pocketmine/PocketMine(462): pocketmine\Server->__construct(pocketmine\CompatibleClassLoader object, pocketmine\utils\MainLogger object, string phar://C:/Users/vesel_000/Desktop/PocketMine-MP/PocketMine-MP.phar/, string C:\Users\vesel_000\Desktop\PocketMine-MP\, string C:\Users\vesel_000\Desktop\PocketMine-MP\plugins\)
    #6 (1): require(string phar://C:/Users/vesel_000/Desktop/PocketMine-MP/PocketMine-MP.phar/src/pocketmine/PocketMine.php)
    PocketMine-MP version: 1.5dev #1088 [Protocol 24; API 1.12.0]
    Git commit: 0000000000000000000000000000000000000000
    uname -a: Windows NT MARECEK-POCITAC 6.3 build 9200 (Windows 8.1 Home Premium Edition) i586
    PHP Version: 5.6.6
    Zend version: 2.6.0
    OS : WINNT, win
  2. Praxthisnovcht
    Offline

    Praxthisnovcht Notable Member Plugin Developer

    Joined:
    Mar 10, 2014
    Posts:
    702
    Plugins:
    4
    Minecraft User:
    PraxHellTag
    Source Code please ?
    PEMapModder likes this.
  3. Martin77Epic
    Offline

    Martin77Epic Banned

    Joined:
    Mar 6, 2015
    Posts:
    164
    Minecraft User:
    CookieMonsterPE
    What is thus
  4. Kiosek
    Offline

    Kiosek New Member

    Joined:
    Jun 17, 2014
    Posts:
    34
    Minecraft User:
    Cecil107
    Code:
    <?php
    
    namespace ClearLagg;
    
    use pocketmine\command\Command;
    use pocketmine\command\CommandSender;
    use pocketmine\command\PluginIdentifiableCommand;
    
    class ClearLaggCommand extends Command implements PluginIdentifiableCommand {
    
      public $plugin;
    
      public function __construct(Loader $plugin) {
        parent::__construct("clearlagg", "Clear the lag!", "/clearlagg <check/clear/killmobs/clearall>", ["lagg"]);
        $this->setPermission("clearlagg.command.clearlagg");
        $this->plugin = $plugin;
      }
    
      public function getPlugin() {
        return $this->plugin;
      }
    
      public function execute(CommandSender $sender, $alias, array $args) {
        if(!$this->testPermission($sender)) {
          return false;
        }
        if(isset($args[0])) {
          switch($args[0]) {
            case "clear":
              $sender->sendMessage("Removed " . $this->getPlugin()->removeEntities() . " entities.");
              return true;
            case "check":
            case "count":
              $c = $this->getPlugin()->getEntityCount();
              $sender->sendMessage("There are " . $c[0] . " players, " . $c[1] . " mobs, and " . $c[2] . " entities.");
              return true;
            case "reload":
              // TODO
              return true;
            case "killmobs":
              $sender->sendMessage("Removed " . $this->getPlugin()->removeMobs() . " mobs.");
              return true;
            case "clearall":
              $sender->sendMessage("Removed " . ($d = $this->getPlugin()->removeMobs()) . " mob" . ($d == 1 ? "" : "s") . " and " . ($d = $this->getPlugin()->removeEntities()) . " entit" . ($d == 1 ? "y" : "ies") . ".");
              return true;
            case "area":
              // TODO
              return true;
            case "unloadchunks":
              // TODO
              return true;
            case "chunk":
              // TODO
              return true;
            case "tpchunk":
              // TODO
              return true;
            default:
              return false;
          }
        }
        return false;
          }
    
    }
  5. Martin77Epic
    Offline

    Martin77Epic Banned

    Joined:
    Mar 6, 2015
    Posts:
    164
    Minecraft User:
    CookieMonsterPE
    Can You make Picture or Viedo
  6. Kiosek
    Offline

    Kiosek New Member

    Joined:
    Jun 17, 2014
    Posts:
    34
    Minecraft User:
    Cecil107
    [​IMG][/url][/IMG] no I am 100% noob :D
    and I am czech
  7. Martin77Epic
    Offline

    Martin77Epic Banned

    Joined:
    Mar 6, 2015
    Posts:
    164
    Minecraft User:
    CookieMonsterPE
    I can Not See Picture
  8. Dinokiller
    Offline

    Dinokiller Notable Member

    Joined:
    Sep 22, 2013
    Posts:
    376
    Minecraft User:
    Dinokiller_
    In plugin.yml your main class needs to be set to
    ClearLagg\Loader
  9. Kiosek
    Offline

    Kiosek New Member

    Joined:
    Jun 17, 2014
    Posts:
    34
    Minecraft User:
    Cecil107
    please code
  10. Martin77Epic
    Offline

    Martin77Epic Banned

    Joined:
    Mar 6, 2015
    Posts:
    164
    Minecraft User:
    CookieMonsterPE
    On IPAD How i Load The Plugin
  11. Martin77Epic
    Offline

    Martin77Epic Banned

    Joined:
    Mar 6, 2015
    Posts:
    164
    Minecraft User:
    CookieMonsterPE
    Ist The Plugin finish
  12. Kiosek
    Offline

    Kiosek New Member

    Joined:
    Jun 17, 2014
    Posts:
    34
    Minecraft User:
    Cecil107
  13. Kiosek
    Offline

    Kiosek New Member

    Joined:
    Jun 17, 2014
    Posts:
    34
    Minecraft User:
    Cecil107
    its unfunctional
  14. Martin77Epic
    Offline

    Martin77Epic Banned

    Joined:
    Mar 6, 2015
    Posts:
    164
    Minecraft User:
    CookieMonsterPE
  15. Kiosek
    Offline

    Kiosek New Member

    Joined:
    Jun 17, 2014
    Posts:
    34
    Minecraft User:
    Cecil107
    can you make plugin?

Share This Page

Advertisement