跳到正文

Private Villagers

作者:codebo

Makes villager trading by using allow lists and listening for workstation placement.

收藏

截图

介绍

中文介绍正在准备中,下面暂时显示原文。

Private Villager

Server-side Fabric mod that makes villagers private! Only the player who placed a workstation can trade with the villager that claimed it. That player can then add allow more players to trade with their Villager!


🎯 How It Works

  1. You place a workstation (lectern, smithing table, etc.)
  2. A villager claims that workstation and gets a profession
  3. That villager now belongs to you — only you can trade with them
  4. Other players see: "You are not allowed to trade with this villager."

No client mod required — works entirely server-side!


✨ Features

Automatic Ownership

  • Villagers are automatically assigned to the player who placed their workstation
  • Ownership persists through server restarts
  • Works with all 13+ villager professions

Allow List System

  • Share your villagers with trusted players
  • Add or remove players from each villager’s allow list
  • Allowed players can trade just like the owner

Admin Commands

  • Operators can reassign or clear villager ownership
  • Useful for server management and disputes

📋 Commands

All commands target the villager you’re looking at, or optionally specify one with an entity selector.

| Command | Description | Permission |
|———|————-|————|
| /villager info [entity] | Show owner and allow list | Everyone |
| /villager add <player> [entity] | Add player to allow list | Owner only |
| /villager remove <player> [entity] | Remove from allow list | Owner only |
| /villager set <player> [entity] | Set new owner | OP only |
| /villager clear [entity] | Remove all ownership data | OP only |

Tab completion is fully supported for player names and entity selectors.


🔧 Tracked Workstations

The mod tracks all villager job site blocks:

| Block | Profession |
|——-|————|
| Blast Furnace | Armorer |
| Smoker | Butcher |
| Cartography Table | Cartographer |
| Brewing Stand | Cleric |
| Composter | Farmer |
| Barrel | Fisherman |
| Fletching Table | Fletcher |
| Cauldron | Leatherworker |
| Lectern | Librarian |
| Stonecutter | Mason |
| Loom | Shepherd |
| Smithing Table | Toolsmith |
| Grindstone | Weaponsmith |


📦 Installation

  1. Install Fabric Loader for your Minecraft version
  2. Install Fabric API
  3. Drop privatevillager-x.x.x-fabric.1.21.x.jar into your server’s mods/ folder
  4. Restart the server

No client installation needed! Players connect with vanilla clients.


🎮 Compatibility

  • Minecraft: 1.21.8 – 1.21.11
  • Environment: Server-side only
  • Dependencies: Fabric API

💡 Use Cases

  • SMP Servers: Prevent villager theft and trading hall griefing
  • Economy Servers: Players can build and protect their own trading infrastructure
  • Shared Bases: Use the allow list to share villagers with teammates

📜 License

MIT License — free to use, modify, and redistribute.

♥️ Donate

If you would like to support me, you can donate here!

常见问题

Private Villagers 支持哪些 Minecraft 版本?

Private Villagers 支持 Minecraft Java 版 1.21.8–1.21.11,共 4 个版本,可用的加载器:Fabric。下载时注意选择和你游戏版本一致的文件。

Private Villagers 怎么安装?

先用 PCL2 或 HMCL 启动器安装对应版本的 Fabric,再把下载的 .jar 文件放进游戏目录的 mods 文件夹,重新启动游戏即可。开启了版本隔离的,mods 文件夹在 versions/版本名 下面。运行环境:仅服务端。

评论

登录后评论和评分