
功能特性
- 基于放置的畜栏 – 将特殊物品作为方块放置,右键点击即可打开 GUI
- 17 页基于页面的 GUI 菜单 – 无外部 GUI 依赖(基于 InventoryClickEvent)
- 14 种默认动物类型 + 成长阶段(BABY → TEEN → ADULT)、等级系统、颜色/主题变体
- 喂食系统 – 手动喂食 + 自动食物存放箱(支持原版和 ItemsAdder 的食物)
- 产品存储 – 动物自动产出物品;可按单个物品取走/出售/丢弃,或一次性全部处理
- 畜栏等级 – 容量、存储空间大小、产量倍率、升级费用、解锁的动物种类
- 物品强化剂 – PRODUCTION / CHANCE / FOOD / LEVEL,可叠加,限时生效
- Vault 经济系统 – 购买动物、升级畜栏、通过出售产品赚取金钱
- 全息显示 – 每个畜栏上方显示(等级、所有者、动物数量、存储空间、倍率、成员)
- 活动日志 – 人类可读格式或 JSON 格式日志,支持轮换与事件过滤
- 存储支持 – SQLite、MySQL、MariaDB,使用 HikariCP 连接池,自动执行模式迁移
- 土耳其语 & 英语 消息文件(
messages_tr.yml / messages_en.yml)
- 大量集成支持 – PlaceholderAPI、ItemsAdder、Towny、Lands、L-Claim、SimpleClaimSystem、WorldGuard、Multiverse-Core、MultiWorld、Geyser/Floodgate(基岩版表单)、EconomyShopGUI、ShopGUIPlus、zShop
- Folia 支持 – 通过反射实现按畜栏的区域性任务
- bStats 指标统计
依赖要求
| 依赖项 |
是否必需 |
用途 |
| Paper / Spigot / Bukkit 1.20.x、1.21.x 或 26.x |
必需 |
服务器平台(也支持 Folia) |
| Java 17+ |
必需 |
运行环境 |
| Vault + 任意经济插件 |
必需 |
货币系统(用于购买、出售、升级) |
| PlaceholderAPI |
可选 |
%lbarn_...% 占位符 |
| ItemsAdder |
可选 |
为畜栏提供自定义方块/物品、食物、图标、产品 |
| Towny / Lands / L-Claim / SimpleClaimSystem / WorldGuard |
可选 |
放置保护规则 |
| Multiverse-Core / MultiWorld |
可选 |
世界黑名单/白名单 |
| Geyser + Floodgate |
可选 |
使用原生基岩版表单替代 Java GUI |
| EconomyShopGUI / ShopGUIPlus / zShop |
可选 |
外部售价提供者 |
支持的插件: Vault, SuperiorSkyblock2, BentoBox, GriefPrevention, HuskClaims, Towny, Lands, L-Claim, SimpleClaimSystem, WorldGuard, Multiverse-Core, MultiWorld, ItemsAdder, Geyser, Floodgate, JobsReborn, AuraSkills, AureliumSkills, mcMMO, MMOCore, EconomyShopGUI, EconomyShopGUI-Premium, ShopGUIPlus, zShop, PlaceholderAPI
游戏玩法
工作原理:
-
获取一个 谷仓方块:使用 /barn item(或管理员运行 /barnadmin give <玩家> [数量])。
-
右键点击任意表面进行放置——将在该位置生成一座谷仓。
-
右键点击该方块以打开 主菜单(仅限所有者或成员)。
-
在 动物商店 中使用金币购买动物(动物需达到对应谷仓等级后解锁)。
-
将食物注入食物储藏室——当玩家处于 spawner.radius 方块范围内(默认 16)时,动物会从中自动进食。
-
进食后的动物会成长(BABY → TEEN → ADULT)、升级,并按照既定时间表在谷仓的存储箱中产出物品。
-
出售或收取产品——全部出售、全部收取,支持对单个物品左键收取/右键出售。
-
升级谷仓以增加容量、存储空间和产量倍率,并解锁新的动物。
-
使用增幅器来倍增生产量、生长速度、食物效率,或在生产时获得额外物品。
-
添加成员并授予他们细粒度的权限,或者拾起谷仓并将其移动到其他地方——数据将完全保留。
生产循环:
- 每
spawner.tick-interval 个刻执行一次(默认 20),但仅在至少有一名玩家处于 spawner.radius 格范围内时(默认 16)运行。附近没有玩家 → 谷仓暂停运作(谷仓永远不会自动删除,即使在空闲状态下也是如此)。
- 自动喂食: 当动物的能量(
food)降至 0 时,会从食物仓库中消耗一个匹配的物品(每个物品提供 feed-value 点能量,上限由 feeding.food-capacity 决定)。
- 饥饿: 每个刻能量流失量为
interval × feeding.bonus-multiplier × hunger-rate × food-reduction(FOOD 增益道具可减少流失量)。
- 成长: 当动物摄入的食物超过单份饲料的
growth-food-threshold-percent 时,成长值以 interval × level-multiplier × level-boost × growth-multiplier 的速度累积(LEVEL 增益道具会乘以该数值)。未进食的动物会失去成长值(每秒减少 growth-decay)。
- 升级: 当成长值达到
growth-per-level(按 growth-requirement-multiplier 缩放)时,动物升级;阶段随等级变化(默认为 BABY lv1 / TEEN lv5 / ADULT lv10)。
- 生产: 每隔
production-interval / (barn-multiplier × production-boost) 秒(最小 1 秒),动物会将其对应阶段的产物(或 ItemsAdder 自定义产品)产出到谷仓存储中。如果存储空间已满,生产将暂停——绝不会静默丢失任何物品。
- CHANCE 增益道具会在每次生产时掷骰
chance-percent,以产生 bonus-amount 个额外物品。
- 统计数据是安全的:所有写入操作均通过单一的异步线程池进行,并在服务器关闭时刷新保存。
破坏与拾取:
- 破坏(Breaking) 可配置(
barn-break):
enabled,可选的 required-tools(默认:铁/金/钻石/下界合金镐),silk-touch 要求(默认:精准采集 I),工具耐久度损失。
- 动物按其购买价格退款。
- 存储内容:如果开启
sell-contents-on-break(不可售物品掉落地上)则自动出售,否则作为物品掉落。
- 畜棚方块以物品形式掉落(
direct-to-inventory 会直接放入背包)。
- 从 GUI 拾取: “拾取畜棚”(Pick Up Barn)会给予一个在隐藏 Lore 标签中携带畜棚 ID 的物品(
LBARN-BARN:<uuid>)。放置该物品将恢复包含所有动物、等级、成员和增益器的畜棚(防崩溃:拾取的畜棚也会在后台保存)。
- 爆炸: 畜棚默认具有防爆性(
explosion-proof);如果禁用,爆炸后的畜棚将从数据库中完全移除(不会出现幽灵畜棚)。
命令与权限
玩家命令:
| 命令 |
描述 |
权限 |
/barn (别名: lbarn, ahir) |
显示你拥有的畜棚数量 |
lbarn.use |
/barn item |
给予你畜棚方块物品 |
lbarn.use |
管理员命令:(别名 /lbarnadmin,支持 Tab 补全)
| 命令 |
描述 |
权限 |
/barnadmin help |
显示帮助页面 |
lbarn.admin |
/barnadmin give <player> [amount] |
给予畜棚方块物品 |
lbarn.admin |
/barnadmin givebooster <player> <boosterId> |
给予增益器物品 |
lbarn.admin |
/barnadmin giveanimal <animalType> <amount> <player> |
向玩家的畜棚添加动物;对玩家打开畜棚选择 GUI,对控制台直接填充畜棚 |
lbarn.admin |
/barnadmin gui [player] |
打开管理员畜棚列表(可按所有者筛选) |
lbarn.admin |
/barnadmin reload |
重新加载所有配置和存储;安全关闭 GUI 并重启任务 |
lbarn.admin |
/barnadmin info |
显示总畜棚和动物统计信息 |
lbarn.admin |
/barnadmin reset |
从存储中重新加载所有畜棚 |
lbarn.admin |
权限节点:
| 权限 |
描述 |
默认值 |
lbarn.use |
使用畜棚菜单和命令 |
所有人 |
lbarn.admin |
完全管理员访问权限(隐含 lbarn.use) |
OP |
lbarn.bypass |
绕过畜棚容量限制 |
OP |
GUI 菜单
所有 GUI 均为分页式,每秒实时刷新(食物计时器、增益器倒计时、进度条),并支持 & 颜色代码。不使用库存 API 或依赖项。
| 菜单 |
大小 |
内容 / 操作 |
| 主菜单 |
27 |
食物寄存处、动物 (x/y)、动物商店、存储、升级、拾取畜棚、成员、增益器、关闭 |
| 动物列表 |
54 |
分页显示动物(每页 45 个),包含等级、阶段、10 格成长条、能量、食物需求、“需要食物”警告、收获就绪状态 |
| 动物商店 |
54 |
可购买类型(由畜棚等级解锁)——价格、生长时间、产品/奖励、经验值、主题;点击购买(先添加后支付,支持回滚) |
| 升级 |
27 |
当前等级信息;下一等级的容量/存储/倍率/成本;点击升级(通过 Vault 支付) |
| 增益器 |
54 |
免费库存——放入增益器物品;关闭/返回时,每种类型的其中一个增益器被消耗并生效(剩余部分返还) |
| 食物寄存处 |
54 |
实时食物库存——直接存入/取出物品;按钮:统计、返回 |
| 食物统计 |
54 |
按食物类型统计每日/每周/每月/总计的食物消耗量 |
| 存储 |
54 |
所有动物的产品:左键点击 = 取到背包,右键点击 = 立即出售;全部取出、全部出售、丢弃(在方块周围掉落)、信息指南、返回 |
| 成员 |
27 |
添加成员(聊天提示)、列出成员;Shift+右键点击移除,点击打开权限设置 |
| 成员权限 |
27 |
针对每个成员切换:食物寄存处访问、存储访问、添加动物、使用增益器 |
| 管理员畜棚列表 |
54 |
所有畜棚(所有者/世界/服务器/坐标);点击管理;玩家搜索(铁砧 GUI);可分页 |
| 管理员畜棚管理 |
54 |
信息摘要 + 传送、查看动物、给予动物、应用增益器、设置等级、成员、存储、食物存储、移除(两次点击确认) |
| 管理员给予动物 |
54 |
选择目标的一个畜棚来添加动物(感知容量) |
| 管理员添加动物 |
54 |
选择动物类型,在聊天中输入数量以添加 |
| 管理员增益器 |
54 |
将任何配置的增益器应用于畜棚 |
| 管理员设置等级 |
54 |
直接将畜棚设置为任何配置的等级 |
动物
animals.yml 中包含 14 种默认动物类型。(阶段进程:BABY lv1 → TEEN lv5 → ADULT lv10)。
| 类型 |
价格 |
解锁等级 |
食物 |
主题 |
产品及间隔 |
| COW |
100 |
1 |
WHEAT, HAY_BLOCK |
3 |
LEATHER x1/x2/x3 (20s/15s/10s) |
| SHEEP |
80 |
1 |
WHEAT |
4 |
WHITE_WOOL x1/x2/x3 (18/12/8) |
| PIG |
70 |
1 |
CARROT, POTATO |
1 |
PORKCHOP x1/x2/x3 (15/10/7) |
| CHICKEN |
40 |
1 |
4 seed types |
1 |
EGG x1/x2/x3 (12/8/5) |
| RABBIT |
60 |
2 |
CARROT, DANDELION |
3 |
RABBIT_HIDE x1/x2/x3 (15/10/6) |
| HORSE |
250 |
3 |
GOLDEN_APPLE, APPLE, HAY_BLOCK |
4 |
LEATHER x2/x3/x5 (25/18/12) |
| GOAT |
110 |
2 |
WHEAT, CARROT |
1 |
MILK_BUCKET x1/x2/x3 (18/12/8) |
| AXOLOTL |
130 |
3 |
TROPICAL_FISH |
3 |
TROPICAL_FISH x1/x2/x3 (18/12/8) |
| COD |
50 |
2 |
COD, SALMON |
1 |
COD x1/x2/x3 (12/8/5) |
| TURTLE |
150 |
4 |
KELP |
1 |
SCUTE x1/x2/x3 (22/15/10) |
| BEE |
90 |
2 |
POPPY, DANDELION, SUNFLOWER |
1 |
HONEYCOMB x1/x2/x3 (14/9/6) |
| FOX |
200 |
4 |
SWEET_BERRIES, GLOW_BERRIES |
2 |
SWEET_BERRIES x2/x3/x5 (24/16/10) |
每种类型都支持 itemsadder: 引用用于食物物品、图标和产品。
畜棚等级
可在 barnlevels.yml 中配置:
| 等级 |
容量 |
存储大小 |
倍率 |
升级费用 |
解锁动物 |
| 1 |
10 |
27 |
1.0 |
500 |
COW, SHEEP, PIG, CHICKEN |
| 2 |
20 |
27 |
1.5 |
2,000 |
RABBIT, GOAT, COD, BEE |
| 3 |
30 |
36 |
2.0 |
8,000 |
HORSE, AXOLOTL |
| 4 |
45 |
36 |
2.75 |
25,000 |
TURTLE, FOX |
| 5 |
65 |
45 |
3.5 |
80,000 |
— |
| 6 |
90 |
45 |
4.5 |
200,000 |
— |
| 7 |
120 |
45 |
6.0 |
500,000 |
— |
| 8 |
160 |
45 |
8.0 |
0 (max) |
— |
增益道具 (Boosters)
可在 boosters.yml 中配置:
| ID |
类型 |
效果 |
持续时间 |
| PRODUCTION |
PRODUCTION |
产量速度 x2.0 |
10 分钟 |
| PRODUCTION_II |
PRODUCTION |
产量速度 x3.0 |
5 分钟 |
| LEVEL |
LEVEL |
生长/升级速度 x1.5 |
5 分钟 |
| LUCK |
CHANCE |
25% 几率获得 +2 额外物品 |
20 分钟 |
| FOOD |
FOOD |
食物消耗速度 x0.5 |
10 分钟 |
stack-mode: additive(叠加或乘算)控制同类增益道具如何组合。
- 同类增益道具会叠加并延长活跃持续时间;不同类的增益道具独立运行。
- 增益道具通过隐藏的 Lore 标签 (
LBARN-BOOSTER:<id>) 被识别,因此可以兼容附魔/存储插件。
经济系统
- Vault 为必需项;当缺少 Vault 或任何经济提供者时,该功能会自动禁用。
- 购买动物和升级畜棚会扣除金钱;出售产品和拆除畜棚会存入金钱。
- 出售价格按以下顺序由
economy.provider 解析:
prices.yml(默认)—— 管理员定义的单种材料价格
economyshopgui / economyshopgui-premium —— EconomyShopGUI 的出售价格
shopguiplus —— ShopGUIPlus 的出售价格
zshop —— zShop 的出售价格(支持 v2 和 v3)
economy.sell-price-multiplier 缩放所有出售金额。
- 货币格式化 (
money-format):使用 K/M/B/T 缩写并保留 0-2 位小数;若禁用则回退到 Vault 的格式化器。
存储
- SQLite (
plugins/L-Barn/barns.db, WAL 模式,忙超时设置) —— 零配置默认选项。
- MySQL / MariaDB —— 由
storage.type 驱动;JDBC 驱动程序已内置。
- HikariCP 连接池 —— 可在
connection-pool 下完全配置(maximum-pool-size、minimum-idle、connection-timeout-ms、max-lifetime-ms、idle-timeout-ms、connection-test-query)。
- 表结构:
lbarn_barns、lbarn_animals、lbarn_food_stats —— 在启动时创建并自动迁移(通过元数据检查添加新列)。
- 存储和食物库存序列化为 Base64 格式的库存数据;成员和增益道具以紧凑文本记录持久化。
- 自动检测 Upsert 语法:针对 MySQL 8.0.19+(行别名)与旧版 MySQL/MariaDB(
VALUES() 函数)。
- 跨服务器 (sync-gui): 若使用 MySQL/MariaDB,请设置
database.server-name(例如 survival-1)并将 database.sync-gui-enabled 设为 true —— 此时管理员畜棚列表将显示共享同一数据库的所有服务器上的畜棚,并标记其所属服务器名称。每个畜棚都会记录其创建所在的服务器。
集成
L-Barn 提供与流行 Minecraft 插件的原生兼容性和集成支持。
PlaceholderAPI (%lbarn_...%):
- 自动注册扩展,支持两种模式:
%lbarn_<key>%(默认畜棚)和 %lbarn_barn_<uuid>_<key>%(指定畜棚)。
- 全局键:
count, has, member_count, is_owner_any, is_member_any
- 畜棚专用键:
level, capacity, animals, animals_free, animals_percent, members, storage_used, storage_max, storage_free, food_used, food_slots, food_max, boost_active, boost_multiplier, boost_count, boost_remaining, boost_remaining_formatted, owner, world, x, y, z, last_activity, next_level, next_level_cost, is_owner, is_member, animals_<typeId>, animals_<typeId>_levels
ItemsAdder:
- 畜棚方块和物品:
itemsadder:namespace:id(回退至 BARREL)
- 动物图标、食物物品和产品支持在任何位置使用
itemsadder: 引用。
领地声明与保护:
- Towny —— 仅限居民,可选国家访问权限 (
require-town, allow-nation)
- Lands —— 需要已声明领地;仅限所有者模式;尊重
BLOCK_PLACE 角色标志
- L-Claim —— 需要已声明区块;市长或成员
- SimpleClaimSystem —— 需要声明;拥有建造权限的所有者/成员/访客
- WorldGuard —— 区域黑名单/白名单,可选构建标志强制执行
- Multiverse-Core / MultiWorld —— 世界黑名单/白名单
基岩版支持 (Geyser / Floodgate):
- 为基岩版玩家提供原生 Cumulus 表单(主菜单、动物、商店、升级确认、存储、增益信息、拾取确认)。
- 颜色代码会被干净地剥离以适应基岩版的渲染。
活动日志记录:
- 文件日志记录至
plugins/L-Barn/logs/activity.log,支持基于大小的轮转。
- 支持人类可读格式或 JSON 格式,控制台镜像,以及 25 种不同的事件类型。
配置
配置文件位于 plugins/L-Barn/ 目录下:
| 文件 |
用途 |
config.yml |
主配置(语言、存储、刷怪、全息图、喂食、经济、日志) |
animals.yml |
动物类型:价格、食物、主题、生长曲线、阶段及产品 |
barnlevels.yml |
畜棚等级曲线:容量、存储大小、倍率、升级费用、解锁内容 |
boosters.yml |
增益道具定义及 stack-mode |
prices.yml |
按材料划分的出售价格(当 economy.provider: prices.yml 时生效) |
messages_tr.yml / messages_en.yml |
所有消息及 GUI 文本(加载时自动填充缺失的键值) |
config.yml 示例:
language: "tr"
storage:
type: "sqlite"
database:
host: "localhost"
port: 3306
database: "lbarn"
user: "root"
password: ""
server-name: "survival-1"
sync-gui-enabled: false
auto-save:
enabled: true
seconds: 300
spawner:
radius: 16
tick-interval: 20
offline-progress-seconds: 0
unload-idle-seconds: 300
barn:
block-material: "BARREL"
item-material: "BARREL"
item-name: "&2&lL-Barn &7Ahır"
explosion-proof: true
```yaml
barn-break:
enabled: true
direct-to-inventory: false
required-tools: [IRON_PICKAXE, GOLDEN_PICKAXE, DIAMOND_PICKAXE, NETHERITE_PICKAXE]
durability-loss: 1
silk-touch:
required: true
level: 1
sell-contents-on-break: false
hologram:
enabled: true
height: 1.25
feeding:
bonus-multiplier: 1.0
food-capacity: 200
economy:
enabled: true
sell-price-multiplier: 1.0
provider: "prices.yml"
money-format:
enabled: true
decimals: 2
logging:
enabled: true
json-format: false
console-output: false
max-log-files: 10
max-log-size-mb: 10
log-all-events: false
支持

Features
- Placement-based barns – place a special item as a block, right-click to open the GUI
- 17 page-based GUI menus – no external GUI dependencies (InventoryClickEvent based)
- 14 default animal types + growth stages (BABY → TEEN → ADULT), leveling, color/theme variants
- Feeding system – manual feeding + automatic food depository (vanilla and ItemsAdder food)
- Product storage – animals produce items automatically; take / sell / drop per item or all at once
- Barn levels – capacity, storage size, yield multiplier, upgrade costs, unlocked animals
- Item boosters – PRODUCTION / CHANCE / FOOD / LEVEL, stackable, time-limited
- Vault economy – buy animals, upgrade barns, earn money from selling products
- Hologram above each barn (level, owner, animals, storage, multiplier, members)
- Activity logging – human-readable or JSON logs with rotation and event filtering
- Storage – SQLite, MySQL, MariaDB with HikariCP pooling, automatic schema migration
- Turkish & English messages (
messages_tr.yml / messages_en.yml)
- Many integrations – PlaceholderAPI, ItemsAdder, Towny, Lands, L-Claim, SimpleClaimSystem, WorldGuard, Multiverse-Core, MultiWorld, Geyser/Floodgate (Bedrock forms), EconomyShopGUI, ShopGUIPlus, zShop
- Folia support – per-barn regional tasks via reflection
- bStats metrics
Requirements
| Dependency |
Required? |
Purpose |
| Paper / Spigot / Bukkit 1.20.x, 1.21.x or 26.x |
Required |
Server platform (Folia also supported) |
| Java 17+ |
Required |
Runtime |
| Vault + any economy plugin |
Required |
Money (buying, selling, upgrades) |
| PlaceholderAPI |
Optional |
%lbarn_...% placeholders |
| ItemsAdder |
Optional |
Custom blocks/items for barns, food, icons, products |
| Towny / Lands / L-Claim / SimpleClaimSystem / WorldGuard |
Optional |
Placement protection rules |
| Multiverse-Core / MultiWorld |
Optional |
World blacklist/whitelist |
| Geyser + Floodgate |
Optional |
Native Bedrock forms instead of Java GUIs |
| EconomyShopGUI / ShopGUIPlus / zShop |
Optional |
External sell-price providers |
Supported Plugins: Vault, SuperiorSkyblock2, BentoBox, GriefPrevention, HuskClaims, Towny, Lands, L-Claim, SimpleClaimSystem, WorldGuard, Multiverse-Core, MultiWorld, ItemsAdder, Geyser, Floodgate, JobsReborn, AuraSkills, AureliumSkills, mcMMO, MMOCore, EconomyShopGUI, EconomyShopGUI-Premium, ShopGUIPlus, zShop, PlaceholderAPI
Gameplay
How It Works:
- Get a barn block:
/barn item (or an admin runs /barnadmin give <player> [amount]).
- Right-click a surface to place it — a barn is created at that location.
- Right-click the block to open the Main Menu (owner or members only).
- Buy animals in the Animal Shop with money (animals unlock at barn levels).
- Pump food into the Food Depository — animals eat automatically from it while a player is within
spawner.radius blocks (default 16).
- Fed animals grow (BABY → TEEN → ADULT), level up, and produce items into the barn's Storage on a schedule.
- Sell or take products — sell all, take all, per-item left-click take / right-click sell.
- Upgrade the barn to increase capacity, storage size and the yield multiplier, and unlock new animals.
- Apply boosters to multiply production, growth speed, food efficiency, or get bonus items on production.
- Add members and grant them fine-grained permissions, or pick the barn up and move it elsewhere — data is fully preserved.
Production Loop:
- Runs every
spawner.tick-interval ticks (default 20) but only while at least one player is within spawner.radius blocks (default 16). No player nearby → the barn pauses (barns never self-delete, not even when idle).
- Auto-feeding: when an animal's energy (
food) drops to 0, one matching item is consumed from the food depository (feed-value energy per item, capped by feeding.food-capacity).
- Hunger: each tick energy drains by
interval × feeding.bonus-multiplier × hunger-rate × food-reduction (FOOD boosters reduce the drain).
- Growth: while fed above
growth-food-threshold-percent of one feed portion, growth accumulates at interval × level-multiplier × level-boost × growth-multiplier (LEVEL boosters multiply this). Unfed animals lose growth (growth-decay per second).
- Leveling: when growth reaches
growth-per-level (scaled by growth-requirement-multiplier), the animal levels up; stages follow the level (BABY lv1 / TEEN lv5 / ADULT lv10 by default).
- Production: every
production-interval / (barn-multiplier × production-boost) seconds (min 1s) the animal produces its stage product (or ItemsAdder custom product) into the barn storage. If storage is full, production pauses — nothing is ever silently lost.
- CHANCE boosters roll
chance-percent for bonus-amount extra items on each production.
- Stats are safe: all writes go through a single async pool and are flushed on shutdown.
Breaking & Pickup:
- Breaking is configurable (
barn-break):
enabled, optional required-tools (default: iron/golden/diamond/netherite pickaxes), silk-touch requirement (default: Silk Touch 1), durability-loss on the tool.
- Animals are refunded at their buy price.
- Storage contents: sold automatically if
sell-contents-on-break (unsellable items drop on the ground) or dropped as items.
- The barn block drops as an item (
direct-to-inventory puts it straight into the inventory).
- Pickup from the GUI: “Pick Up Barn” gives an item that carries the barn's ID in a hidden lore tag (
LBARN-BARN:<uuid>). Placing it restores the barn with all animals, level, members, and boosters (crash-safe: picked-up barns are saved in the background too).
- Explosions: barns are
explosion-proof by default; if disabled, an exploded barn is fully removed from the database (no ghost barns).
Commands & Permissions
Player Commands:
| Command |
Description |
Permission |
/barn (aliases: lbarn, ahir) |
Shows how many barns you own |
lbarn.use |
/barn item |
Gives you the barn block item |
lbarn.use |
Admin Commands: (alias /lbarnadmin, supports tab completion)
| Command |
Description |
Permission |
/barnadmin help |
Shows the help page |
lbarn.admin |
/barnadmin give <player> [amount] |
Gives barn block items |
lbarn.admin |
/barnadmin givebooster <player> <boosterId> |
Gives a booster item |
lbarn.admin |
/barnadmin giveanimal <animalType> <amount> <player> |
Adds animals to a player's barn(s); opens a barn-picker GUI for players, fills barns directly for console |
lbarn.admin |
/barnadmin gui [player] |
Opens the Admin Barn List (optionally filtered by owner) |
lbarn.admin |
/barnadmin reload |
Reloads all configuration and storage; safely closes GUIs and restarts tasks |
lbarn.admin |
/barnadmin info |
Shows total barn and animal statistics |
lbarn.admin |
/barnadmin reset |
Reloads all barns from storage |
lbarn.admin |
Permission Nodes:
| Permission |
Description |
Default |
lbarn.use |
Use barn menus and commands |
everyone |
lbarn.admin |
Full admin access (implies lbarn.use) |
op |
lbarn.bypass |
Bypass barn capacity limits |
op |
GUI Menus
All GUIs are page-based, refresh live every second (food timers, booster countdowns, progress bars), and support & color codes. No inventory APIs or dependencies are used.
| Menu |
Size |
Content / Actions |
| Main Menu |
27 |
Food Depository, Animals (x/y), Animal Shop, Storage, Upgrade, Pick Up Barn, Members, Booster, Close |
| Animal List |
54 |
Paginated animals (45/page) with level, stage, 10-block growth bar, energy, food requirements, "requires food" warning, harvest-ready state |
| Animal Shop |
54 |
Buyable types (unlocked by barn level) — price, growth time, product/reward, XP, themes; click to buy (add-then-pay with rollback) |
| Upgrade |
27 |
Current level info; next level capacity/storage/multiplier/cost; click to upgrade (paid via Vault) |
| Booster |
54 |
Free inventory — drop booster items in; on close/back, one booster of each kind is consumed and applied (leftovers returned) |
| Food Depository |
54 |
The live food inventory — deposit/withdraw items directly; buttons: stats, back |
| Food Stats |
54 |
Daily / weekly / monthly / all-time food consumption per food type |
| Storage |
54 |
Products of all animals: left-click = take to inventory, right-click = sell instantly; Take All, Sell All, Drop (drops around the block), info guide, back |
| Members |
27 |
Add member (chat prompt), list members; shift-right-click removes, click opens permissions |
| Member Permissions |
27 |
Toggle per member: Food Depository access, Storage access, Add Animal, Booster use |
| Admin Barn List |
54 |
All barns (owner/world/server/coords); click to manage; player search (anvil GUI); pageable |
| Admin Barn Management |
54 |
Info summary + Teleport, View Animals, Give Animals, Apply Booster, Set Level, Members, Storage, Food Storage, Remove (two-click confirm) |
| Admin Give Animals |
54 |
Pick one of the target's barns to add animals (capacity-aware) |
| Admin Add Animal |
54 |
Choose animal type, type an amount in chat to add |
| Admin Booster |
54 |
Apply any configured booster to the barn |
| Admin Set Level |
54 |
Set the barn to any configured level directly |
Animals
14 default animal types included in animals.yml. (Stage progression: BABY lv1 → TEEN lv5 → ADULT lv10).
| Type |
Price |
Unlock Level |
Food |
Themes |
Products & Intervals |
| COW |
100 |
1 |
WHEAT, HAY_BLOCK |
3 |
LEATHER x1/x2/x3 (20s/15s/10s) |
| SHEEP |
80 |
1 |
WHEAT |
4 |
WHITE_WOOL x1/x2/x3 (18/12/8) |
| PIG |
70 |
1 |
CARROT, POTATO |
1 |
PORKCHOP x1/x2/x3 (15/10/7) |
| CHICKEN |
40 |
1 |
4 seed types |
1 |
EGG x1/x2/x3 (12/8/5) |
| RABBIT |
60 |
2 |
CARROT, DANDELION |
3 |
RABBIT_HIDE x1/x2/x3 (15/10/6) |
| HORSE |
250 |
3 |
GOLDEN_APPLE, APPLE, HAY_BLOCK |
4 |
LEATHER x2/x3/x5 (25/18/12) |
| GOAT |
110 |
2 |
WHEAT, CARROT |
1 |
MILK_BUCKET x1/x2/x3 (18/12/8) |
| AXOLOTL |
130 |
3 |
TROPICAL_FISH |
3 |
TROPICAL_FISH x1/x2/x3 (18/12/8) |
| COD |
50 |
2 |
COD, SALMON |
1 |
COD x1/x2/x3 (12/8/5) |
| TURTLE |
150 |
4 |
KELP |
1 |
SCUTE x1/x2/x3 (22/15/10) |
| BEE |
90 |
2 |
POPPY, DANDELION, SUNFLOWER |
1 |
HONEYCOMB x1/x2/x3 (14/9/6) |
| FOX |
200 |
4 |
SWEET_BERRIES, GLOW_BERRIES |
2 |
SWEET_BERRIES x2/x3/x5 (24/16/10) |
Every type supports itemsadder: references for food items, icons and products.
Barn Levels
Configurable in barnlevels.yml:
| Level |
Capacity |
Storage Size |
Multiplier |
Upgrade Cost |
Unlocked Animals |
| 1 |
10 |
27 |
1.0 |
500 |
COW, SHEEP, PIG, CHICKEN |
| 2 |
20 |
27 |
1.5 |
2,000 |
RABBIT, GOAT, COD, BEE |
| 3 |
30 |
36 |
2.0 |
8,000 |
HORSE, AXOLOTL |
| 4 |
45 |
36 |
2.75 |
25,000 |
TURTLE, FOX |
| 5 |
65 |
45 |
3.5 |
80,000 |
— |
| 6 |
90 |
45 |
4.5 |
200,000 |
— |
| 7 |
120 |
45 |
6.0 |
500,000 |
— |
| 8 |
160 |
45 |
8.0 |
0 (max) |
— |
Boosters
Configurable in boosters.yml:
| ID |
Type |
Effect |
Duration |
| PRODUCTION |
PRODUCTION |
2.0x production speed |
10 min |
| PRODUCTION_II |
PRODUCTION |
3.0x production speed |
5 min |
| LEVEL |
LEVEL |
1.5x growth/leveling speed |
5 min |
| LUCK |
CHANCE |
25% chance for +2 bonus items |
20 min |
| FOOD |
FOOD |
0.5x food consumption |
10 min |
stack-mode: additive (additive or multiplicative) controls how same-kind boosters combine.
- Same-kind boosters stack and extend the active duration; different kinds run independently.
- Booster items are recognized by a hidden lore tag (
LBARN-BOOSTER:<id>), so they survive enchantment/storage plugins.
Economy
- Vault is required; disabled automatically when Vault or an economy provider is missing.
- Buying animals and upgrading barns withdraw money; selling products and breaking barns deposit it.
- Sell prices are resolved in this order by
economy.provider:
prices.yml (default) — per-material prices defined by the admin
economyshopgui / economyshopgui-premium — EconomyShopGUI sell prices
shopguiplus — ShopGUIPlus sell prices
zshop — zShop sell prices (v2 & v3 supported)
economy.sell-price-multiplier scales every sale.
- Money formatting (
money-format): compact K/M/B/T abbreviations with 0-2 decimals; falls back to Vault's formatter when disabled.
Storage
- SQLite (
plugins/L-Barn/barns.db, WAL mode, busy timeout) — zero-config default.
- MySQL / MariaDB — driven by
storage.type; JDBC drivers are bundled.
- HikariCP connection pool — fully configurable under
connection-pool (maximum-pool-size, minimum-idle, connection-timeout-ms, max-lifetime-ms, idle-timeout-ms, connection-test-query).
- Tables:
lbarn_barns, lbarn_animals, lbarn_food_stats — created and auto-migrated (adding new columns with metadata checks) on startup.
- Storage & food inventories are serialized Base64 inventories; members and boosters are persisted as compact text records.
- Upsert syntax auto-detected for MySQL 8.0.19+ (row aliases) vs older MySQL/MariaDB (
VALUES()).
- Cross-server (sync-gui): with MySQL/MariaDB set
database.server-name (e.g. survival-1) and database.sync-gui-enabled: true — the admin barn list then shows barns from all servers sharing the database, tagged with their server name. Every barn records the server it was created on.
Integrations
L-Barn provides native compatibility and integrations with popular Minecraft plugins.
PlaceholderAPI (%lbarn_...%):
- Auto-registered expansion with two modes:
%lbarn_<key>% (default barn) and %lbarn_barn_<uuid>_<key>% (explicit barn).
- Global keys:
count, has, member_count, is_owner_any, is_member_any
- Barn keys:
level, capacity, animals, animals_free, animals_percent, members, storage_used, storage_max, storage_free, food_used, food_slots, food_max, boost_active, boost_multiplier, boost_count, boost_remaining, boost_remaining_formatted, owner, world, x, y, z, last_activity, next_level, next_level_cost, is_owner, is_member, animals_<typeId>, animals_<typeId>_levels
ItemsAdder:
- Barn block and item:
itemsadder:namespace:id (fallback to BARREL)
- Animal icons, food items, and products support
itemsadder: references anywhere.
Land Claims & Protection:
- Towny – residents only, optional nation access (
require-town, allow-nation)
- Lands – requires claimed land; owner-only mode; respects
BLOCK_PLACE role flag
- L-Claim – requires claimed chunk; mayor or member
- SimpleClaimSystem – requires claim; owner/member/visitor build permission
- WorldGuard – region blacklist/whitelist, optional build-flag enforcement
- Multiverse-Core / MultiWorld – world blacklist/whitelist
Bedrock Support (Geyser / Floodgate):
- Native Cumulus forms for Bedrock players (main menu, animals, shop, upgrade confirm, storage, booster info, pickup confirm).
- Color codes are stripped cleanly for Bedrock rendering.
Activity Logging:
- File logging to
plugins/L-Barn/logs/activity.log with size-based rotation.
- Supports human-readable or JSON format, console mirroring, and 25 distinct event types.
Configuration
Configuration files located in plugins/L-Barn/:
| File |
Purpose |
config.yml |
Main configuration (language, storage, spawner, hologram, feeding, economy, logging) |
animals.yml |
Animal types: price, food, themes, growth curve, stages & products |
barnlevels.yml |
Barn level curve: capacity, storage size, multiplier, upgrade cost, unlocks |
boosters.yml |
Booster definitions + stack-mode |
prices.yml |
Sell prices per material (when economy.provider: prices.yml) |
messages_tr.yml / messages_en.yml |
All messages & GUI texts (auto-filled with missing keys on load) |
Example config.yml:
language: "tr"
storage:
type: "sqlite"
database:
host: "localhost"
port: 3306
database: "lbarn"
user: "root"
password: ""
server-name: "survival-1"
sync-gui-enabled: false
auto-save:
enabled: true
seconds: 300
spawner:
radius: 16
tick-interval: 20
offline-progress-seconds: 0
unload-idle-seconds: 300
barn:
block-material: "BARREL"
item-material: "BARREL"
item-name: "&2&lL-Barn &7Ahır"
explosion-proof: true
barn-break:
enabled: true
direct-to-inventory: false
required-tools: [IRON_PICKAXE, GOLDEN_PICKAXE, DIAMOND_PICKAXE, NETHERITE_PICKAXE]
durability-loss: 1
silk-touch:
required: true
level: 1
sell-contents-on-break: false
hologram:
enabled: true
height: 1.25
feeding:
bonus-multiplier: 1.0
food-capacity: 200
economy:
enabled: true
sell-price-multiplier: 1.0
provider: "prices.yml"
money-format:
enabled: true
decimals: 2
logging:
enabled: true
json-format: false
console-output: false
max-log-files: 10
max-log-size-mb: 10
log-all-events: false
Support
评论 0
登录后参与评分
还没有评论,来抢沙发吧