This commit is contained in:
Dylan T
2024-03-25 17:24:52 +00:00
committed by GitHub
parent 09904dc519
commit d5919dc094

View File

@ -158,7 +158,7 @@ abstract class Living extends Entity{
}
};
$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);
},
function(Inventory $inventory, array $oldContents) use ($playArmorSound) : void{