diff --git a/src/pocketmine/Server.php b/src/pocketmine/Server.php index c209d6d5b..47d28f75e 100644 --- a/src/pocketmine/Server.php +++ b/src/pocketmine/Server.php @@ -1434,7 +1434,7 @@ class Server{ $this->tickSleeper->addNotifier($consoleNotifier, function() : void{ $this->checkConsole(); }); - $this->console->start(); + $this->console->start(PTHREADS_INHERIT_NONE); $version = new VersionString($this->getPocketMineVersion()); diff --git a/src/pocketmine/command/CommandReader.php b/src/pocketmine/command/CommandReader.php index 34d709435..84e3261da 100644 --- a/src/pocketmine/command/CommandReader.php +++ b/src/pocketmine/command/CommandReader.php @@ -49,6 +49,8 @@ class CommandReader extends Thread{ if(extension_loaded("readline") and !isset($opts["disable-readline"]) and !$this->isPipe(STDIN)){ $this->type = self::TYPE_READLINE; } + + $this->setClassLoader(); } public function shutdown(){ @@ -168,6 +170,8 @@ class CommandReader extends Thread{ } public function run(){ + $this->registerClassLoader(); + if($this->type !== self::TYPE_READLINE){ $this->initStdin(); }