A listing that is being bought, bid on, cancelled or finished is locked. A second buyer is refused and not charged.
A purchase saves the sale, the seller's payout and the buyer's item in one database transaction. Only after it is saved is the item handed out. If saving fails, the buyer is refunded and the listing unlocked.
Items are stored with all their data, so enchantments, names, custom plugin data and contents are kept.
Menu clicks, drags, shift-clicks, hotbar swaps and creative copies are blocked, and a stray menu item is removed from inventories.
Database work runs on its own thread. Queued saves are written when the server stops.