Automatically buys and sells items with villagers.
Includes automatic restocking, storing, and highly configurable trade options.
You need the following setup ingame:
- A villager trading hall. Its best to be compact - the plugin won't go searching for villagers outside render distance.
- Chests to restock trade inputs from. You can set up a hopper system to constantly refill the chests.
- Chests to store the items bought from trades. You can set up a hopper system to transfer items out to larger storage systems.
trader on/offtrader add <id> <profession> <inputItem1> <outputItem> <inputItem1ChestPos> <outputChestPos>- One input item trades
trader add <id> <profession> <inputItem1> <inputItem2> <outputItem> <inputItem1ChestPos> <inputItem2ChestPos> <outputChestPos>- Two input items trades
trader set help- Prints many additional trade configuration subcommands, like enchantments, price limits, and restock + deposit thresholds
trader del <id>trader cleartrader listtrader waitForInteractionTimeout <ticks>
Each enabled trade is executed one at a time, in a never-ending loop.
Input items are withdrawn and trade outputs are deposited as configured by their respective restock/deposit thresholds.
A trade will interact with all loaded villagers in render distance matching the trade's set profession once.
Matching villager offers are bought until inputs are exhausted or output slots are full.
When no un-traded villagers remain, a configured postTradeStore action is executed before the next trade begins: either doing nothing (default), depositing inputs back to their chests, or depositing to a separate "overflow" chest
Special thanks to @Devin for providing a reference trading module and explanation