mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-21 03:59:43 +00:00
bed position is saved in playerdata, bed destruction will teleport you to the world spawn
This commit is contained in:
parent
60c29e9dd1
commit
6ab777e5e9
4 changed files with 39 additions and 14 deletions
|
|
@ -109,8 +109,9 @@ class LevelAPI{
|
|||
return true;
|
||||
}
|
||||
/**
|
||||
* Gets a level by name. Returns false if no level with such name exists.
|
||||
* @param string $name
|
||||
* @return Level|boolean
|
||||
* @return Level|false
|
||||
*/
|
||||
public function get($name){
|
||||
if(isset($this->levels[$name])){
|
||||
|
|
|
|||
|
|
@ -404,7 +404,8 @@ class PlayerAPI{
|
|||
"lastIP" => "",
|
||||
"lastID" => 0,
|
||||
"achievements" => [],
|
||||
"slot-count" => 7
|
||||
"slot-count" => 7,
|
||||
"bed-position" => null,
|
||||
];
|
||||
|
||||
if(!file_exists(DATA_PATH . "players/" . $iname . ".yml")){
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue