mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-15 18:29:46 +00:00
Crash if player spawn back to Y coord. >0 & <1
The issue come from line 2664 : $v = $spawn->floor() If $spawn->y is in ]0..1[ then $v->y == 0 Then getBlockId : line 2670 use 'y' as -1 => Crash boom
This commit is contained in:
parent
fc42fc534b
commit
675583293f
@ -2657,7 +2657,7 @@ class Level implements ChunkManager, Metadatable{
|
||||
* @return bool|Position
|
||||
*/
|
||||
public function getSafeSpawn($spawn = null){
|
||||
if(!($spawn instanceof Vector3) or $spawn->y <= 0){
|
||||
if(!($spawn instanceof Vector3) or $spawn->y < 1){
|
||||
$spawn = $this->getSpawnLocation();
|
||||
}
|
||||
if($spawn instanceof Vector3){
|
||||
|
Loading…
x
Reference in New Issue
Block a user