Skip to content

Commit 09904dc

Browse files
authored
workaround for callback-validator not understanding arrow functions
1 parent f799cfa commit 09904dc

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/entity/Living.php

+3-1
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,9 @@ protected function initEntity(CompoundTag $nbt) : void{
158158
}
159159
};
160160
$this->armorInventory->getListeners()->add(new CallbackInventoryListener(
161-
fn(Inventory $inventory, int $slot, Item $oldItem) => $playArmorSound($inventory->getItem($slot), $oldItem),
161+
function(Inventory $inventory, int $slot, Item $oldItem) : void{
162+
$playArmorSound($inventory->getItem($slot), $oldItem);
163+
},
162164
function(Inventory $inventory, array $oldContents) use ($playArmorSound) : void{
163165
foreach($oldContents as $slot => $oldItem){
164166
$playArmorSound($inventory->getItem($slot), $oldItem);

0 commit comments

Comments
 (0)