fixed warnings when switching gamemode

This commit is contained in:
GameHerobrine 2024-07-06 02:21:51 +03:00
parent 9aa0986145
commit 205e432f52

View file

@ -1791,7 +1791,7 @@ class Player{
if($this->server->handle("player.equipment.change", $data) !== false){
$this->slot = $packet->slot;
if(($this->gamemode & 0x01) === SURVIVAL){
if(($this->gamemode & 0x01) === SURVIVAL && count($this->hotbar) >= $this->slotCount){
$has = false;
for($i = 0; $i < $this->slotCount; ++$i){