mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-20 11:39:43 +00:00
switching gamemode to 1/3 wont remove items from survival inventory
This commit is contained in:
parent
26516699c7
commit
187a2d0805
2 changed files with 43 additions and 19 deletions
|
|
@ -397,6 +397,7 @@ class PlayerAPI{
|
|||
$player = $this->server->clients[$CID];
|
||||
$player->data = $this->getOffline($player->username);
|
||||
$player->gamemode = $player->data->get("gamemode");
|
||||
$player->saveInventory = ($player->gamemode & 1) == SURVIVAL;
|
||||
if(($player->level = $this->server->api->level->get($player->data->get("position")["level"])) === false){
|
||||
$player->level = $this->server->api->level->getDefault();
|
||||
$player->data->set("position", [
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue