mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-26 04:43:45 +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);
|
$pos = new Position($pos->x, $pos->y, $pos->z, $pos->level);
|
||||||
$block = $pos->level->getBlock($pos);
|
$block = $pos->level->getBlock($pos);
|
||||||
}
|
}
|
||||||
|
if($block === false){
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
$level = $block->onUpdate($type);
|
$level = $block->onUpdate($type);
|
||||||
if($level === BLOCK_UPDATE_NORMAL){
|
if($level === BLOCK_UPDATE_NORMAL){
|
||||||
$this->blockUpdateAround($block, $level);
|
$this->blockUpdateAround($block, $level);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user