mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-20 11:39:43 +00:00
New VIEW gamemode
This commit is contained in:
parent
5848d283da
commit
3577667039
10 changed files with 58 additions and 32 deletions
|
|
@ -132,7 +132,12 @@ class PlayerAPI{
|
|||
"c" => CREATIVE,
|
||||
"2" => ADVENTURE,
|
||||
"adventure" => ADVENTURE,
|
||||
"a" => ADVENTURE,
|
||||
"a" => ADVENTURE,
|
||||
"3" => VIEW,
|
||||
"view" => VIEW,
|
||||
"viewer" => VIEW,
|
||||
"spectator" => VIEW,
|
||||
"v" => VIEW,
|
||||
);
|
||||
if($issuer instanceof Player){
|
||||
$player = $issuer;
|
||||
|
|
@ -328,7 +333,7 @@ class PlayerAPI{
|
|||
console("[NOTICE] Player data not found for \"".$iname."\", creating new profile");
|
||||
$data->save();
|
||||
}
|
||||
if($this->server->gamemode === CREATIVE){
|
||||
if(($this->server->gamemode & 0x01) === 0x01){
|
||||
$data->set("health", 20);
|
||||
}
|
||||
$this->server->handle("player.offline.get", $data);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue