readded return in reset spawn pos & some fixes to formatting

This commit is contained in:
GameHerobrine 2024-08-17 16:10:23 +03:00
parent f74e6e0638
commit ed4f820ff3
9 changed files with 25 additions and 24 deletions

View file

@ -413,7 +413,7 @@ class Player{
* @return Item
*/
public function getSlot($slot){
return $this->inventory[(int)$slot] ?? BlockAPI::getItem(AIR, 0, 0);
return $this->inventory[(int)$slot] ?? BlockAPI::getItem(AIR, 0, 0);
}
/**
@ -720,7 +720,7 @@ class Player{
* @return Item
*/
public function getArmor($slot){
return $this->armor[(int)$slot] ?? BlockAPI::getItem(AIR, 0, 0);
return $this->armor[(int)$slot] ?? BlockAPI::getItem(AIR, 0, 0);
}
public function setArmor($slot, Item $armor, $send = true){
@ -1029,7 +1029,8 @@ class Player{
}
}
}
reset_spawn_pos:
return;
reset_spawn_pos:
$this->spawnPosition = $this->server->api->level->getDefault()->getSpawn();
}
}