mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-20 11:39:43 +00:00
hotbar is full of air in spectator mode now
This commit is contained in:
parent
77a896b18c
commit
fc2e104c41
1 changed files with 7 additions and 2 deletions
|
|
@ -1535,7 +1535,7 @@ class Player{
|
|||
}
|
||||
|
||||
if($this->sendingInventoryRequired){
|
||||
if(($this->gamemode & 0x01) !== CREATIVE){
|
||||
if($this->gamemode !== CREATIVE){
|
||||
$hotbar = [];
|
||||
foreach($this->hotbar as $slot){
|
||||
$hotbar[] = $slot <= -1 ? -1 : $slot + 9;
|
||||
|
|
@ -2380,7 +2380,12 @@ class Player{
|
|||
}
|
||||
|
||||
$data["slot"] = $packet->slot;
|
||||
|
||||
|
||||
if($this->gamemode == VIEW && $packet->item != AIR){
|
||||
$this->sendInventory();
|
||||
break;
|
||||
}
|
||||
|
||||
if($this->server->handle("player.equipment.change", $data) !== false){
|
||||
if(!Player::$experimentalHotbar) $this->slot = $packet->slot;
|
||||
if(($this->gamemode & 0x01) === SURVIVAL){
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue