mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-20 16:00:20 +00:00
Fixed server not stopping after a fatal error
This commit is contained in:
parent
4569a73f3d
commit
d5012f6fcf
@ -2004,9 +2004,6 @@ class Server{
|
||||
global $lastExceptionError, $lastError;
|
||||
$lastExceptionError = $lastError;
|
||||
$this->crashDump();
|
||||
$this->forceShutdown();
|
||||
kill(getmypid());
|
||||
exit(1);
|
||||
}
|
||||
|
||||
public function crashDump(){
|
||||
@ -2051,6 +2048,9 @@ class Server{
|
||||
//$this->checkMemory();
|
||||
//$dump .= "Memory Usage Tracking: \r\n" . chunk_split(base64_encode(gzdeflate(implode(";", $this->memoryStats), 9))) . "\r\n";
|
||||
|
||||
$this->forceShutdown();
|
||||
kill(getmypid());
|
||||
exit(1);
|
||||
}
|
||||
|
||||
public function __debugInfo(){
|
||||
|
@ -1724,7 +1724,7 @@ class Level implements ChunkManager, Metadatable{
|
||||
}
|
||||
foreach($this->chunkSendQueue[$index] as $player){
|
||||
/** @var Player $player */
|
||||
if(isset($player->usedChunks[$index])){
|
||||
if($player->isConnected() and isset($player->usedChunks[$index])){
|
||||
$player->sendChunk($x, $z, $payload);
|
||||
}
|
||||
}
|
||||
@ -1929,15 +1929,13 @@ class Level implements ChunkManager, Metadatable{
|
||||
$spawn = $this->getSpawnLocation();
|
||||
}
|
||||
if($spawn instanceof Vector3){
|
||||
$x = Math::floorFloat($spawn->x);
|
||||
$y = Math::floorFloat($spawn->y);
|
||||
$z = Math::floorFloat($spawn->z);
|
||||
$v = new Vector3($x, $y, $z);
|
||||
for(; $v->y > 0; --$v->y){
|
||||
$b = $this->getBlock($v->getSide(0));
|
||||
$v = $spawn->floor();
|
||||
for(; $v->y > 0; $v->y -= 2){
|
||||
$b = $this->getBlock($v);
|
||||
if($b === null){
|
||||
return $spawn;
|
||||
}elseif(!($b instanceof Air)){
|
||||
$v->y += 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user