hopefiully fixed some warning eqozqq has

This commit is contained in:
GameHerobrine 2025-08-10 21:11:42 +03:00
parent e827c1ed15
commit 8046d0e17c

View file

@ -1593,7 +1593,8 @@ class Player{
}else{
$pk->slots = [];
for($i = 0; $i < 9; ++$i){
[$id, $meta] = BlockAPI::$creative[$this->hotbar[$i]] ?? [0, 0];
if(!isset($this->hotbar[$i])) [$id, $meta] = [0, 0];
else [$id, $meta] = BlockAPI::$creative[$this->hotbar[$i]] ?? [0, 0];
$pk->slots[$i] = BlockAPI::getItem($id, $meta, 1);
}
$hotbar = [9, 10, 11, 12, 13, 14, 15, 16, 17];