Convert CreativeInventory to singleton

This commit is contained in:
Dylan K. Taylor
2020-04-24 00:38:18 +01:00
parent 5cc03775d3
commit 08ac6a3c43
4 changed files with 21 additions and 27 deletions

View File

@@ -204,7 +204,7 @@ class InventoryManager{
$items = [];
$typeConverter = TypeConverter::getInstance();
if(!$this->player->isSpectator()){ //fill it for all gamemodes except spectator
foreach(CreativeInventory::getAll() as $i => $item){
foreach(CreativeInventory::getInstance()->getAll() as $i => $item){
$items[$i] = $typeConverter->coreItemStackToNet($item);
}
}