With AdvancedTrades, your villagers can also trade commands instead of items.
Add commands setting under tradeResult section and set your commands there. Example of commands section:
commands: # If command reward is set, only commands will be ran when trading, # read more at https://trades.advancedplugins.net/configuration/commands
- 'give %player% diamond_sword 1 name:&cCommand_Sword'
Example of this command setting in full trade:
tradeResult:# Item which villager will offer in exchange of trade ingredientsvillager: experience: 5 # Experience gained by villager with this trade, read more at https://trades.advancedplugins.net/trades/levels
item: # Item will not be given when traded, if command reward is set, read more at https://trades.advancedplugins.net/configuration/commands
type:'DIAMOND_SWORD'amount:1name:'&cCommand Sword'lore: - '&dExclusive from &dVillagers'enchantments: - 'Sharpness:5' - 'Unbreaking:2' commands: # If command reward is set, only commands will be ran when trading, # read more at https://trades.advancedplugins.net/configuration/commands
- 'give %player% diamond_sword 1 name:&cCommand_Sword'