Every Bedrock multiplayer server has the same ritual. You want to trade an enchanted sword for a stack of diamonds, so you both walk to a quiet corner, count to three, and throw your items on the ground. Whoever grabs first wins — and whoever lags, misclicks, or trusts the wrong person loses everything.
There is no trade window in Bedrock Edition. Not natively. Not as a toggle. Not even as an experimental flag.
Java players take secure trading for granted. Bedrock players get drop-trading roulette: scammers who grab and run, creepers that blow up the merchandise, despawn timers that eat your Netherite gear, and zero proof of who agreed to what. Server admins know the aftermath well — a daily queue of "he stole my Sharpness V sword" tickets with no logs and no way to restore the exact item.
/trade, lock your items in, and swap atomically. If anything goes wrong, every item comes back.
✅ Achievement-Friendly — product_type: addon 🔒 Lossless escrow 📦 Claim inbox
⚠️ Know Before You Trade
An honest list of what PlayerTrade can and cannot do by design — no fine print, no surprises after install:
Other Known Limitations
- Custom runtime components: items from other addons with live custom-component state swap exactly while both players are online (clone vault). After a restart the JSON fallback restores everything except live custom state — the trade view shows a warning for affected items.
- Swap atomicity: if both inventories are completely full at confirm, the trade aborts back to DRAFT (locks reset, escrow held) instead of fake-completing — free space and confirm again.
- Privacy: Browse only shows partner-less drafts. Trades with two parties are visible only to their participants.
- Form-based picking: Bedrock server forms have no chest grid, so items are picked from dropdown lists (5 per step, 9 max per side) rather than drag-and-drop.
- Name lookup: player search is xuid-first with name fallback, so renames are safe; duplicated names resolve to the first online match.
What It Does
PlayerTrade wraps the whole deal in an escrow vault with a dual-lock handshake:
[+] The Trade Flow
- New Trade — pick an online partner, select up to 5 items per step (9 slots max per side), add an optional note. Your items lock into escrow instantly.
- Partner adds items — the invitee opens My Trades, adds their side, and both players hit Lock Ready.
- Confirm Swap — the initiator confirms via a yes/no dialog. Items swap atomically: both online means direct delivery, anything else routes to the Inbox.
- Cancel / Reject — either side can back out before confirm. Both sides are refunded instantly; offline leftovers wait in the Inbox.
[O] The Inbox (Nothing Gets Lost)
- Cancelled, rejected, expired trades refund to inventory — or to the Inbox if you are offline or full.
- Offline swaps park each side's items in the recipient's Inbox with a TTL.
- Full inventory at swap or claim? Overflow waits in the Inbox. Partial claims re-save the rest — claim again after freeing space.
- Auto-expiry sweeps stale trades every 1200 ticks with full refund.
[@] Full Item-Data Preservation
- Names, lore & enchants: custom anvil names, lore and raw lore, exact enchantment levels — all survive the round trip.
- Durability: damage values plus the unbreakable flag, rebuilt clamped to each item's true
maxAmountso pearls and tools never inflate. - Special items: dyed armor colors, written book pages with title/author/signed state, tags, canDestroy/canPlaceOn, item dynamic properties, keepOnDeath and lockMode.
- Honest snapshots: potion, cooldown, repairable and enchant-slot data is recorded as informational only (engine-owned, not re-applied). A
verifySnapshot()gate refuses escrow on mismatch — items stay untouched instead of trading damaged.
Technology Stack
Behavior Pack (EuForia Bedrock PlayerTrade [BP])
| Component | Technology | Version |
|---|---|---|
| Runtime | Minecraft Bedrock Scripting API | @minecraft/server 2.8.0 (stable) |
| UI | Server Forms | @minecraft/server-ui 2.0.0 (stable) |
| Language | JavaScript (ES Modules) | — |
| Entry Point | scripts/main.js | Thin registrar + expiry interval |
| Architecture | 8 modular files, lazy-loaded command handlers — No external dependencies | |
Key APIs used:
ItemStack.clone()— lossless in-memory escrow vault, consumed exactly onceEntityInventoryComponent+Container— inventory reads, escrow locking, swap deliveryActionFormData,ModalFormData,MessageFormData— all UI forms (native Bedrock feel)world.setDynamicProperty()— sharded trade ledger, inbox, swap locks, historycustomCommandRegistry.registerCommand()—/trade(Any, cheats OFF) +/euforia:trade-admin(GameDirectors)player.playSound()+onScreenDisplay.setActionBar()— trade notificationssystem.run()+system.runTimeout()— read-only callback deferral, 1-tick form delay
Resource Pack (EuForia Bedrock PlayerTrade [RP])
| Component | Technology |
|---|---|
| Icons | 9 vanilla-derived 16x16 trade glyphs (swap, box, ledger, inbox, check, cross, hand, undo, info) |
| Binding | Self-activating via manifest UUID dependency |
Module Architecture
EuForia Bedrock PlayerTrade/
├── behavior_pack/
│ ├── manifest.json (BP manifest, product_type: addon)
│ └── scripts/
│ ├── main.js (entry — command registration + expiry interval)
│ ├── core/
│ │ ├── constants.js (namespace, limits, palette, status machine, messages)
│ │ ├── serializer.js (ItemStack <-> JSON snapshot + verifySnapshot)
│ │ ├── database.js (sharded dynamic-property ledger + inbox + locks)
│ │ ├── escrow.js (in-memory clone vault, consumed exactly once)
│ │ ├── trade-service.js (draft → locked → confirmed → completed/…)
│ │ └── notify.js (sounds + actionbar + chat notifications)
│ └── commands/
│ ├── trade.js (/trade menu tree: New, Browse, My Trades, Inbox, Help)
│ └── trade-admin.js (GameDirectors inspect + force-cancel)
│
└── resource_pack/
├── manifest.json (RP manifest)
├── pack_icon.png
└── textures/ (vanilla-derived trade icons)
Manifest Features
- Achievement-compatible:
"product_type": "addon"metadata preserves world achievements - Min engine: 1.26+
- No experimental features required — everything used is stable
Challenges Resolved
Our V.1.0.1 self-critique audit found real flaws in the initial release. Here's what we fixed and how:
Atomic Swap Guard
The swap could "complete" with zero items delivered when both inventories were full. Now confirm re-loads the trade first (aborting on mid-confirm changes), and a both-full swap returns to DRAFT with locks reset and escrow held — free space and confirm again.
Refund Persistence
Escrow snapshots are re-persisted on every refund path, so retries can never double-pay and restarts can't strand items.
True Stack Clamp
Rebuilds used to clamp to a hardcoded 255. Now they clamp to each item's real maxAmount — pearls, eggs and tools never inflate.
Honest Snapshot Docs
Enchant slots, potion/cooldown/repairable/maxDur snapshots are labeled informational-only everywhere. Restored fields are exactly: levels, damage, unbreakable, dye, book, tags, lore, name.
Who This Is For
- 🏕️ Survival servers & realms — scam-proof trading without throwing items on the ground
- 🖥️ Server admins — per-trade audit logs, admin force-cancel, and an end to item-loss tickets
- 🔧 Addon developers — enchanted, renamed, lore-heavy and book items trade without data loss
- ⚙️ Technical players — atomic swaps with expiry, locks, and reclaim semantics
- 🎥 Content creators — a clean native-feeling trade UI for videos and live events
Installation
- Download the Behavior Pack
.mcpackand the Resource Pack.mcpack. - Open each file — Minecraft Bedrock imports them automatically into your library.
- Open or create a world, navigate to World Settings → Add-Ons, and activate EuForia Bedrock PlayerTrade [BP] under Behavior Packs (the Resource Pack self-activates via manifest dependency).
- Join the world and type
/trade— cheats stay OFF, every player can use it immediately.
To remove, deactivate the Behavior Pack from the same Add-Ons menu. Stored trades live in world dynamic properties and vanish with the pack data.
What's Next?
This is V.1.0.0 — the secure foundation. Future updates we're considering:
- Trade value preview — repair cost and enchant summary before you lock
- Timed trade requests — accept/decline popup for the invited partner
- Barter listings board — public offers with one-click accept
- Per-player trade history export — receipts for disputes and videos
License
✅ What You Can Do
- Use this addon in your own worlds, servers, and content
- Modify, remix, and build upon it for personal or community projects
- Share it with friends, communities, and players
❌ What You Cannot Do
- Sell it, bundle it in paid products, or use it for commercial monetization
- Re-upload it as-is (direct rehost) on CurseForge, MCPEDL, or any other platform — substantial modification and added value are required before redistribution
📋 Attribution Policy
By downloading and using EuForia Bedrock PlayerTrade, you are automatically considered to have given appropriate credit. You do not need to write out attribution text or include a credit line — using the addon is credit enough.
📄 Full license terms: creativecommons.org/licenses/by-nc/4.0/
Icon credit: Trade icons are vanilla derivatives — © Mojang/Microsoft, edited by EuForia.
Feedback & Community
Found a bug? Have a feature request or an idea to make this addon better? We would love to hear from you.
Drop your suggestions, bug reports, or just say hello — the EuForia community is always open.
"No more drop-trading.
No more lost enchanted swords."
📥 Download
Minecraft Bedrock 1.26+ · CC BY-NC 4.0 · Achievement Friendly