diff --git a/composer.json b/composer.json index 10417526..63e9734b 100644 --- a/composer.json +++ b/composer.json @@ -1,11 +1,11 @@ { - "name": "sof3/libasynql", + "name": "nethergamesmc/libasynql", "type": "library", "require": { "sof3/await-generator": "^2.0.0 || ^3.0.0" }, "require-dev": { - "pocketmine/pocketmine-mp": "^5.0.0-BETA4" + "nethergamesmc/pocketmine-mp": "dev-stable" }, "license": "Apache-2.0", "autoload": { @@ -19,6 +19,9 @@ "email": "sofe2038@gmail.com" } ], + "repositories": [ + { "type": "vcs", "url": "git@github.com:NetherGamesMC/PocketMine-MP.git" } + ], "bin": [ "libasynql/cli/def.php", "libasynql/cli/fx.php" diff --git a/libasynql/src/poggit/libasynql/base/SqlSlaveThread.php b/libasynql/src/poggit/libasynql/base/SqlSlaveThread.php index b2b4cc9a..1571a91c 100644 --- a/libasynql/src/poggit/libasynql/base/SqlSlaveThread.php +++ b/libasynql/src/poggit/libasynql/base/SqlSlaveThread.php @@ -53,9 +53,11 @@ protected function __construct(SleeperHandlerEntry $entry, QuerySendQueue $buffe if(!libasynql::isPackaged()){ /** @noinspection NullPointerExceptionInspection */ - /** @var ClassLoader $cl */ - $cl = Server::getInstance()->getPluginManager()->getPlugin("DEVirion")->getVirionClassLoader(); - $this->setClassLoaders([Server::getInstance()->getLoader(), $cl]); + /** @var ?ClassLoader $cl */ + $cl = Server::getInstance()->getPluginManager()->getPlugin("DEVirion")?->getVirionClassLoader(); + if($cl !== null){ + $this->setClassLoaders([Server::getInstance()->getLoader(), $cl]); + } } $this->start(NativeThread::INHERIT_INI); }