SecureTrade

SecureTrade

SecureTrade is a Minecraft plugin that allows players to safely trade items and money through a simple confirmation based GUI.

4 downloads

SecureTrade

SecureTrade is a safe player-to-player trading plugin for Paper 1.21+. Players can exchange items and optionally money through a shared trading GUI with confirmation protection, automatic cancellation and trade history.

Features

  • Shared trading GUI
  • 16 item slots for each player
  • Optional money trading with Vault
  • Two-sided confirmation system
  • Final countdown before completing a trade
  • Confirmations reset whenever an offer changes
  • Items are returned if a trade is cancelled
  • Request timeouts and cooldowns
  • Configurable maximum trading distance
  • Automatic cancellation when a player disconnects, closes the GUI, takes damage or moves too far away
  • Inventory-space and balance checks
  • SQLite trade history
  • Admin history lookup
  • Configurable messages and sounds
  • Tab completion
  • Bypass permissions for administrators

Requirements

  • Paper 1.21 or newer
  • Java 21
  • Vault and a compatible economy plugin are optional

Vault is only required for money trading. Item trading works without Vault.

Installation

  1. Download the SecureTrade .jar file.
  2. Place it inside your server’s plugins folder.
  3. Install Vault and an economy plugin if you want to enable money trading.
  4. Start or restart the server.
  5. Edit plugins/SecureTrade/config.yml if required.
  6. Use /trade reload after changing the configuration.

How to Use

  1. Send a request using /trade <player>.
  2. The other player accepts it using /trade accept.
  3. Both players place their items into their own side of the trading GUI.
  4. Items can also be shift-clicked into the trade.
  5. Use /trade money <amount> to include money in your offer.
  6. Click your red confirmation block when your offer is ready.
  7. Once both players confirm, a short countdown begins.
  8. The items and money are exchanged when the countdown finishes.

Changing an item or money offer resets both confirmations. The gold ingots in the GUI display each player’s current money offer, while the barrier cancels the trade.

Commands

  • /trade <player> — Send a trade request
  • /trade accept [player] — Accept a trade request
  • /trade deny [player] — Deny a trade request
  • /trade money <amount> — Set your money offer
  • /trade cancel — Cancel your current trade
  • /trade history — View your recent trade history
  • /trade history <player> — View another player’s trade history
  • /trade reload — Reload the configuration
  • /securetrade — Alias for /trade

Permissions

  • securetrade.use — Use the trading system
    Default: Everyone

  • securetrade.money — Add money to a trade
    Default: Everyone

  • securetrade.history — View personal trade history
    Default: Operators

  • securetrade.history.others — View another player’s trade history
    Default: Operators

  • securetrade.reload — Reload the plugin configuration
    Default: Operators

  • securetrade.bypass.cooldown — Bypass the request cooldown
    Default: Operators

  • securetrade.bypass.distance — Bypass the maximum trading distance
    Default: Operators

Configuration

The following settings can be changed inside config.yml:

  • Trade-request timeout
  • Request cooldown
  • Confirmation countdown
  • Maximum trading distance
  • Cancel trades when players take damage
  • Enable or disable money trading
  • Number of history entries displayed
  • Plugin messages
  • Sound effects

Trade History

Every completed trade is stored automatically in:

plugins/SecureTrade/trades.db

The database records both players, exchanged items, exchanged money and the completion time.

Default Safety Checks

A trade is cancelled if:

  • A player closes the trade menu
  • A player disconnects
  • A player takes damage
  • The players move too far apart
  • A player does not have enough inventory space
  • A player no longer has enough money

When a trade is cancelled, all offered items are safely returned to their owners.