Trade Companion — server plugin
Player trading with real escrow: the server holds both sides and makes the swap in one operation, or not at all.
This is the server half. It needs the client mod Trade Companion (https://www.curseforge.com/minecraft/mc-mods/trade-companion) on the player's side. Nothing breaks for players who don't have it: they get an explanation instead of an error, and keep playing.
What it does
Two players open a trade window, put in items and money, talk it over and accept. When both accept, the server moves everything at once.
- An "accept" is bound to the exact table each player signed. If the offer changes, the signatures stop matching. A modified client can send whatever it likes; the worst it achieves is its own signature not matching what the server has stored.
- Items are moved, not recreated. Durability, enchantments and NBT arrive intact.
- Atomic. Either both halves happen or neither does, with a rollback at every failure point.
- Money through Vault, inside the same atomic operation as the items.
- Receipts. Every trade is stored on both sides: what for what, with whom, and when. When someone says they got scammed, staff can look at what actually happened.
Install
Drop the jar in plugins/ and restart. For money, add Vault (https://github.com/MilkBowl/Vault) and any economy plugin.
Tested on Paper 1.21.8, Vault 1.7.3 and EssentialsX 2.21.2.
Commands
/trade <player>— invite someone to trade (everyone)/trade recibos— your last 10 trades (everyone)/trade recibos <player>— someone else's, to settle a report (staff)/trade ignorar <player>— stop receiving invites from that person (everyone)/trade reload— reload config and language without a restart (staff)
In game, shift + right click on a player is enough.
Permissions
tradecompanion.use— everyonetradecompanion.admin— op
Configuration
idioma: es # es or en. The texts live in lang/ and are yours:
# the plugin never overwrites them.
distancia-maxima: 12 # In blocks. 0 removes the limit.
invitacion-cooldown-segundos: 8
invitacion-vence-segundos: 20
recibos-por-jugador: 20
The distance limit exists for a reason: without it, trading becomes an item teleport — someone mines at the bottom of a cave and ships everything to a partner back at base without walking. Requiring players to stand next to each other keeps commerce where it belongs, and makes scamming cost you showing up in person.
Status
0.9.0-beta. The trade is tested end to end, including money through Vault and EssentialsX and the rollback at every failure point. What it lacks is mileage: it has never run with real latency or with more than two players. If you install it, the log helps — every rejected offer is logged with the two descriptors side by side, and an unreadable config.yml says so in red instead of silently starting with all defaults.
License
GPL-3.0-or-later.
Trade Companion — plugin de servidor (español)
Intercambios entre jugadores con escrow real: el servidor retiene lo de los dos y hace el cambio en una sola operación, o no lo hace.
Necesita el mod cliente Trade Companion del lado del jugador. Sin el mod no pasa nada malo: quien no lo tenga recibe una explicación en vez de un error, y sigue jugando normal.
Qué hace
Dos jugadores abren una ventana de intercambio, ponen ítems y plata, charlan y aceptan. Cuando los dos aceptan, el servidor mueve todo de una vez.
- Un "acepto" está atado a la mesa exacta que firmó cada uno. Si la oferta cambia, las firmas dejan de valer.
- Los ítems se mueven, no se recrean. Durabilidad, encantamientos y NBT llegan intactos.
- Atómico. O pasan las dos mitades o no pasa ninguna, con rollback en cada punto de falla.
- Plata vía Vault, dentro de la misma operación atómica que los ítems.
- Recibos. Cada intercambio queda guardado de los dos lados: qué por qué, con quién y cuándo.
Instalación
Poné el jar en plugins/ y reiniciá. Para plata, agregá Vault y cualquier plugin de economía.
Probado sobre Paper 1.21.8, Vault 1.7.3 y EssentialsX 2.21.2.
Estado
0.9.0-beta. El intercambio está probado de punta a punta, incluida la plata con Vault y EssentialsX y el rollback en cada punto de falla. Lo que falta es rodaje: nunca corrió con latencia real ni con más de dos jugadores.

