mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-23 11:26:37 +00:00
Fixed crashes while crashing related to plugins
This commit is contained in:
parent
0a52e210db
commit
6d90f91be0
@ -24,6 +24,7 @@ namespace pocketmine;
|
|||||||
use pocketmine\network\mcpe\protocol\ProtocolInfo;
|
use pocketmine\network\mcpe\protocol\ProtocolInfo;
|
||||||
use pocketmine\plugin\PluginBase;
|
use pocketmine\plugin\PluginBase;
|
||||||
use pocketmine\plugin\PluginLoadOrder;
|
use pocketmine\plugin\PluginLoadOrder;
|
||||||
|
use pocketmine\plugin\PluginManager;
|
||||||
use pocketmine\utils\Utils;
|
use pocketmine\utils\Utils;
|
||||||
use pocketmine\utils\VersionString;
|
use pocketmine\utils\VersionString;
|
||||||
use raklib\RakLib;
|
use raklib\RakLib;
|
||||||
@ -86,7 +87,7 @@ class CrashDump{
|
|||||||
}
|
}
|
||||||
|
|
||||||
private function pluginsData(){
|
private function pluginsData(){
|
||||||
if(class_exists("pocketmine\\plugin\\PluginManager", false)){
|
if($this->server->getPluginManager() instanceof PluginManager){
|
||||||
$this->addLine();
|
$this->addLine();
|
||||||
$this->addLine("Loaded plugins:");
|
$this->addLine("Loaded plugins:");
|
||||||
$this->data["plugins"] = [];
|
$this->data["plugins"] = [];
|
||||||
|
@ -1937,8 +1937,10 @@ class Server{
|
|||||||
UPnP::RemovePortForward($this->getPort());
|
UPnP::RemovePortForward($this->getPort());
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->getLogger()->debug("Disabling all plugins");
|
if($this->pluginManager instanceof PluginManager){
|
||||||
$this->pluginManager->disablePlugins();
|
$this->getLogger()->debug("Disabling all plugins");
|
||||||
|
$this->pluginManager->disablePlugins();
|
||||||
|
}
|
||||||
|
|
||||||
foreach($this->players as $player){
|
foreach($this->players as $player){
|
||||||
$player->close($player->getLeaveMessage(), $this->getProperty("settings.shutdown-message", "Server closed"));
|
$player->close($player->getLeaveMessage(), $this->getProperty("settings.shutdown-message", "Server closed"));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user