mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-20 11:39:43 +00:00
Added a normal Temporal Generator
This commit is contained in:
parent
8bf10c523e
commit
a830555d90
7 changed files with 120 additions and 4 deletions
|
|
@ -426,11 +426,15 @@ class PlayerAPI{
|
|||
"lastIP" => "",
|
||||
"lastID" => 0,
|
||||
);
|
||||
$data = new Config(DATA_PATH."players/".$iname.".yml", CONFIG_YAML, $default);
|
||||
|
||||
if(!file_exists(DATA_PATH."players/".$iname.".yml")){
|
||||
console("[NOTICE] Player data not found for \"".$iname."\", creating new profile");
|
||||
$data = new Config(DATA_PATH."players/".$iname.".yml", CONFIG_YAML, $default);
|
||||
$data->save();
|
||||
}else{
|
||||
$data = new Config(DATA_PATH."players/".$iname.".yml", CONFIG_YAML, $default);
|
||||
}
|
||||
|
||||
if(($this->server->gamemode & 0x01) === 0x01){
|
||||
$data->set("health", 20);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue