This commit is contained in:
Dylan T 2024-03-25 17:24:52 +00:00 committed by GitHub
parent 09904dc519
commit d5919dc094
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -158,7 +158,7 @@ abstract class Living extends Entity{
} }
}; };
$this->armorInventory->getListeners()->add(new CallbackInventoryListener( $this->armorInventory->getListeners()->add(new CallbackInventoryListener(
function(Inventory $inventory, int $slot, Item $oldItem) : void{ function(Inventory $inventory, int $slot, Item $oldItem) use ($playArmorSound) : void{
$playArmorSound($inventory->getItem($slot), $oldItem); $playArmorSound($inventory->getItem($slot), $oldItem);
}, },
function(Inventory $inventory, array $oldContents) use ($playArmorSound) : void{ function(Inventory $inventory, array $oldContents) use ($playArmorSound) : void{