Merge branch 'master' into mcpe-1.1

This commit is contained in:
Dylan K. Taylor
2017-05-04 21:15:49 +01:00
15 changed files with 201 additions and 39 deletions

View File

@ -1940,8 +1940,10 @@ class Server{
UPnP::RemovePortForward($this->getPort());
}
$this->getLogger()->debug("Disabling all plugins");
$this->pluginManager->disablePlugins();
if($this->pluginManager instanceof PluginManager){
$this->getLogger()->debug("Disabling all plugins");
$this->pluginManager->disablePlugins();
}
foreach($this->players as $player){
$player->close($player->getLeaveMessage(), $this->getProperty("settings.shutdown-message", "Server closed"));
@ -2084,7 +2086,8 @@ class Server{
try{
$dump = new CrashDump($this);
}catch(\Throwable $e){
$this->logger->critical($this->getLanguage()->translateString("pocketmine.crash.error", $e->getMessage()));
$this->logger->logException($e);
$this->logger->critical($this->getLanguage()->translateString("pocketmine.crash.error", [$e->getMessage()]));
return;
}
@ -2199,9 +2202,6 @@ class Server{
$pk = new PlayerListPacket();
$pk->type = PlayerListPacket::TYPE_ADD;
foreach($this->playerList as $player){
if($p === $player){
continue; //fixes duplicates
}
$pk->entries[] = [$player->getUniqueId(), $player->getId(), $player->getDisplayName(), $player->getSkinId(), $player->getSkinData()];
}