public function addTransaction(Transaction $transaction)
{
$this->transactionQueue->enqueue($transaction);
if ($transaction->getInventory() instanceof Inventory) {
/** For dropping items, the target inventory is open air, a.k.a. null. */
$this->inventories[spl_object_hash($transaction)] = $transaction->getInventory();
}
$this->lastUpdate = microtime(true);
$this->transactionCount += 1;
}