Automatically buys items from villagers in exchange for emeralds.
Includes automatic restocking, storing, and configurable to any type of villager and buy item.
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.
- A chest to restock emeralds or emerald blocks from. You can set up a hopper system to constantly refill this chest.
- A chest to store the items bought from trades. You can set up a hopper system to transfer items out to larger storage systems.
trader on/off
trader professions add/del <profession>
-> villager types to trade withtrader professions clear
trader buyItems add/del <item name>
-> item(s) to buy from villagerstrader buyItems clear
trader restockChest <x> <y> <z>
trader storeChest <x> <y> <z>
trader restockStacks <int>
-> how many stacks of emeralds/emerald blocks to restock. Emerald blocks are crafted down to emeralds.trader villagerTradeRestockWait <seconds>
-> seconds it waits after all villagers are out of stock. 1200 = 1 minecraft daytrader maxSpendPerTrade <int>
-> max emeralds to spend per trade.trader buyItemStoreStacksThreshold <int>
-> how many stacks/slots of items to buy before it stores themtrader waitForInteractTimeout <ticks>
-> timeout for server interactions like opening the villager trade window
This module is intended to be run continuously.
It will only stop in the following cases:
- No emeralds remain in the restock chest
- No villagers are found.
- Unable to deposit bought items in the store chest. Could happen if the chest is full.
If villagers are present but their trades are out of stock, it will go into a temporary waiting state and continue after.
Special thanks to @Devin for providing a reference trading module and explanation