DUXPLIMA Documentation

Villagers

Trades that never lock out, a restock timer, a trade editor, protection, pickup, follow and leash.

The villagers module hands you the trading and settlement knobs a survival or economy server usually reaches for several small plugins to get: trades that never lock out, a restock timer in place of the vanilla work-station cycle, a staff trade editor, click-to-trade access, villager protection, pickup, follow and leashing. Each is an independent switch in one file.

Module villagers · disabled by default · modules/villagers/config.conf

Commands

CommandWhat it doesPermission
/villagerManage the villager you are looking at (/villager manager, /villager protect, /villager follow).uxmessentials.villagers.use

Permissions

NodeDefaultGrants
uxmessentials.module.villagersopHot-reload / inspect the villagers module (villager trade management).
uxmessentials.villagers.bucketopSneak-right-click a villager to pick it up into a captured-villager item, and place it back later.
uxmessentials.villagers.followop/villager follow: toggle whether the villager you are looking at pathfinds after you.
uxmessentials.villagers.leashopRight-click a villager with a lead to leash it, when leashing is enabled.
uxmessentials.villagers.managerop/villager manager: open and edit the trades of the villager you are looking at.
uxmessentials.villagers.protectop/villager protect: toggle whether the villager you are looking at is protected from death and despawn.
uxmessentials.villagers.tradeopOpen a villager's trade window directly on right-click, when click-to-trade is enabled.
uxmessentials.villagers.useop/villager: the root command's base node; its subcommands each gate further on their own node.

Settings

KeyDefaultWhat it does
infinite-trading.enabledtrueInfinite trading: a villager's trades never lock out from use.
restock.enabledtrueRestock timer: instead of relying on the vanilla work-station cycle, a scheduled sweep restocks a villager's trades once its last restock is older than interval-seconds.
restock.interval-seconds600Restock timer: instead of relying on the vanilla work-station cycle, a scheduled sweep restocks a villager's trades once its last restock is older than interval-seconds.
instant-restock.enabledfalseInstant restock: the trade a player just used restocks immediately, with no cooldown.
disable-trades.enabledfalseDisable trades: with enabled = true, every villager refuses to open its trade GUI (the right-click is cancelled and the player is told).
trade-manager.enabledtrueTrade manager: with enabled = true, staff holding uxmessentials.villagers.manager run /villager manager to open the villager they are looking at (or the nearest within reach) and edit its trades: change a recipe's buy/sell items and amounts, add a recipe, remove one, or toggle that villager's disable flag.
click-to-trade.enabledtrueClick-to-trade: with enabled = true, a player holding uxmessentials.villagers.trade who right-clicks a villager opens its trade window directly, even where the vanilla gate would refuse it (a professionless villager, one already busy with another trader).
protect.enabledtrueProtection ("villager saver"): with enabled = true, a protected villager never dies to the deaths a settlement loses villagers to and is kept loaded so it never despawns.
protect.allfalseShield every villager, not only those marked with /villager protect.
protect.from-zombiestrueCancel a zombie infecting the villager into a zombie villager.
protect.from-lightningtrueCancel a lightning strike's damage and the villager-to-witch transform it triggers.
protect.from-damagetrueCancel other lethal damage: suffocation, fire, drowning, a mob's or player's blow.
protect.no-despawntrueKeep the villager loaded (mark it persistent) so it never despawns when no player is nearby.
bucket.enabledfalseVillager-in-a-bucket: with enabled = true, a player holding uxmessentials.villagers.bucket sneak-right-clicks a villager to pick it up into a captured-villager item that stores the villager's profession, type, level, and trades.
follow.enabledtrueFollow: with enabled = true, a player holding uxmessentials.villagers.follow runs /villager follow to make the villager they are looking at (or the nearest within reach) pathfind after them.
follow.speed1.0Follow: with enabled = true, a player holding uxmessentials.villagers.follow runs /villager follow to make the villager they are looking at (or the nearest within reach) pathfind after them.
follow.range16Follow: with enabled = true, a player holding uxmessentials.villagers.follow runs /villager follow to make the villager they are looking at (or the nearest within reach) pathfind after them.
leash.enabledfalseLeash: with enabled = true, a player holding uxmessentials.villagers.leash right-clicks a villager with a lead in hand to leash it; something vanilla never allows.

Placeholders

PlaceholderRenders
%uxmessentials_villagers_following%How many villagers are walking after the player right now.
%uxmessentials_villagers_has_follower%Whether any villager is following the player (yes/no).

Notes

  • The module ships off because every feature in it rewrites villager trading, and a server that wants vanilla villagers should get them. Switched on, the six tools most servers want are already armed.
  • Infinite trading resets a villager's recipe uses after each trade, so no trade ever greys out. Turn it off to restore the vanilla limits.
  • Click-to-trade opens a villager the vanilla gate would refuse, a professionless or already-busy one, for holders of the trade node. A villager disabled globally or by its own flag still never opens.
  • Protection is per villager unless you set all = true. /villager protect marks one, and a protected villager survives zombies, lightning and damage and is kept loaded so it cannot despawn.
  • The trade editor is staff-only and edits the live villager, so a fix takes effect without a restart.

Related: Economy, Survival, NPCs