mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-25 04:13:44 +00:00
Fixed crash after level unload
This commit is contained in:
parent
164b420af6
commit
13bfaaf7b8
@ -741,6 +741,10 @@ class BlockAPI{
|
||||
$pos = new Position($pos->x, $pos->y, $pos->z, $pos->level);
|
||||
$block = $pos->level->getBlock($pos);
|
||||
}
|
||||
if($block === false){
|
||||
return false;
|
||||
}
|
||||
|
||||
$level = $block->onUpdate($type);
|
||||
if($level === BLOCK_UPDATE_NORMAL){
|
||||
$this->blockUpdateAround($block, $level);
|
||||
|
Loading…
x
Reference in New Issue
Block a user