mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-23 04:59:46 +00:00
reset spawn to whatever world has if bed is missing/obstructed
This commit is contained in:
parent
6ab777e5e9
commit
d735564948
1 changed files with 1 additions and 0 deletions
|
|
@ -2432,6 +2432,7 @@ class Player{
|
||||||
remove_bed:
|
remove_bed:
|
||||||
$this->sendChat("The bed is missing or cannot be accessed.");
|
$this->sendChat("The bed is missing or cannot be accessed.");
|
||||||
$this->setBedPosition(null);
|
$this->setBedPosition(null);
|
||||||
|
$this->setSpawn($this->level->getSpawn());
|
||||||
}else{
|
}else{
|
||||||
$spawnPoint = BedBlock::findStandUpPosition($level, $x, $y, $z);
|
$spawnPoint = BedBlock::findStandUpPosition($level, $x, $y, $z);
|
||||||
if($spawnPoint == null) goto remove_bed;
|
if($spawnPoint == null) goto remove_bed;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue