| Name | OpenTrades |
| Syntax | opentrades [<entity>/<trade>|...] (title:<title>) (players:<player>|...) |
| Short Description | Opens the specified villager entity's trading inventory or a list of trades. |
| Full Description | Forces a player to open a villager's trading inventory or a virtual trading inventory.
If an entity is specified, only one player can be specified. Otherwise, if a list of trades is specified, more than one player can be specified. If the title is not specified, no title will be applied to the virtual trading inventory. If no player is specified, by default the attached player will be forced to trade. |
| Related Tags | <PlayerTag.selected_trade_index> Returns the index of the trade the player is currently viewing, if any.
<EntityTag.is_trading> Returns whether the villager entity is trading.
<EntityTag.trades> Returns a list of the Villager's trade recipes.
<EntityTag.trading_with> Returns the player who is trading with the villager entity, or null if it is not trading.
|
| Usage Example | |
| Usage Example | |
| Usage Example | |
| Group | player |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/scripts/commands/player/OpenTradesCommand.java#L31 |