mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-21 20:19:44 +00:00
hopefiully fixed some warning eqozqq has
This commit is contained in:
parent
e827c1ed15
commit
8046d0e17c
1 changed files with 2 additions and 1 deletions
|
|
@ -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];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue