Commands
On this page(5)
The root command is /trade, with the default alias /sntrade. The aliases live in command.aliases in config.yml and are re-read on /trade reload. Bare /trade prints the help, listing only the subcommands you can use.
Player commands
| Command | Description |
|---|---|
/trade <player> | Sends a trade request. Same as /trade request <player>. |
/trade request <player> | Sends a trade request to a player. |
/trade accept [player] | Accepts a trade request. Without a name, the latest one. |
/trade deny [player] | Denies a trade request. Without a name, the latest one. |
/trade cancel | Cancels your trade, or the trade requests you sent when you are not trading. |
/trade toggle | Turns your incoming trade requests on or off. |
/trade claims | Opens your claims mailbox: items and money waiting for you. |
/trade history [page] | Shows your trade history, as a menu or a chat list per presentation.history. |
/trade help [page] | Shows the commands you can use. |
request, accept, deny and cancel need sntrade.use, toggle needs sntrade.toggle, claims needs sntrade.claims and history needs sntrade.history. Every node is granted by default. See Permissions.
Subcommand names win over player names. A player literally named accept is reached with /trade request accept. A request also shows clickable [Accept] and [Deny] buttons, and with requests.interact-to-request.enabled: true you can sneak and right-click a player to send one.
Admin commands
| Command | Permission | Description |
|---|---|---|
/trade toggle <player> | sntrade.admin.toggle | Turns an online player's trade requests on or off. Also needs sntrade.toggle. |
/trade history <player> [page] | sntrade.admin.history | Shows another player's trade history. Also needs sntrade.history. |
/trade lock [server|network] [reason] | sntrade.admin.lock | Locks trading on this server (the default) or on every server sharing the database. Live trades end and their items go back. |
/trade unlock [server|network] | sntrade.admin.lock | Lifts every lock, or only the one you name. |
/trade forcecancel <player> | sntrade.admin.forcecancel | Cancels a player's trade. Every offered item goes back to its owner. |
/trade recover <player> | sntrade.admin.recover | Moves a player's crash-interrupted trade items to their claims. Accepts the player's UUID when the server knows no name. |
/trade reload | sntrade.admin.reload | Reloads config.yml, the language file, the menus and the currencies. Live trades are cancelled and returned first. |
/trade debug | sntrade.admin.debug | Toggles the debug output. |
lock, unlock, forcecancel, recover and toggle <player> also work from the console.
How /trade history reads its arguments
- A lone number of up to nine digits is a page of your own history.
- With
sntrade.admin.history, a lone number of three to nine digits is read as a player name when the server knows one. - A longer number, or any other word, is a player name. Two arguments are always a player and a page.
The trade lock
/trade lockwith no scope locks this server. Any first word other thanserverornetworkstarts the reason.- The lock is stored in the database, so it survives restarts.
networkneeds every server on the same MySQL database, each with its ownserver-name. Other servers apply it withinlock.network-refresh-seconds. With SQLite it covers this server only.- Until a server has read the lock state from the database, trading stays locked.
/trade reloadretries the read at once. - An unlock keeps trading locked until the database confirms it. If one lock is lifted while the other remains, you are told that trading is still locked.
Recovering a crash-interrupted trade
After a crash, staff with sntrade.notify are told about interrupted trades, and the console lists each one with what the trade log says about it. Check the player's inventory first, then run /trade recover <player> only when the items are really missing.
- Trades logged as completed are skipped automatically.
- Trades logged as cancelled are refused, because their return may already have completed.
- With
history.enabled: false, or when the log lookup failed, the answer says the log could not confirm the trade never completed. Check the trade partner as well.
/trade recover grants items to the claims mailbox and cannot be undone. Nothing is restored automatically after a crash, because the player file usually still holds the item. Recover only after you checked the player and the trade partner.