▶️ ЗАБЕРИ СВОИ 8 ПОДАРКОВ 🎁 ПРИ СОЗДАНИИ СВОЕГО МАЙНКРАФТ СЕРВЕРА
L-Barn

L-Barn

Fully virtual GUI-based barn plugin with dynamic spawning

Оцените первым
21
0

!logo


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

DependencyRequired?Purpose
Paper / Spigot / Bukkit 1.20.x, 1.21.x or 26.xRequiredServer platform (Folia also supported)
Java 17+RequiredRuntime
Vault + any economy pluginRequiredMoney (buying, selling, upgrades)
PlaceholderAPIOptional%lbarn_...% placeholders
ItemsAdderOptionalCustom blocks/items for barns, food, icons, products
Towny / Lands / L-Claim / SimpleClaimSystem / WorldGuardOptionalPlacement protection rules
Multiverse-Core / MultiWorldOptionalWorld blacklist/whitelist
Geyser + FloodgateOptionalNative Bedrock forms instead of Java GUIs
EconomyShopGUI / ShopGUIPlus / zShopOptionalExternal 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:

  1. Get a barn block: /barn item (or an admin runs /barnadmin give <player> [amount]).
  2. Right-click a surface to place it — a barn is created at that location.
  3. Right-click the block to open the Main Menu (owner or members only).
  4. Buy animals in the Animal Shop with money (animals unlock at barn levels).
  5. Pump food into the Food Depository — animals eat automatically from it while a player is within spawner.radius blocks (default 16).
  6. Fed animals grow (BABY → TEEN → ADULT), level up, and produce items into the barn's Storage on a schedule.
  7. Sell or take products — sell all, take all, per-item left-click take / right-click sell.
  8. Upgrade the barn to increase capacity, storage size and the yield multiplier, and unlock new animals.
  9. Apply boosters to multiply production, growth speed, food efficiency, or get bonus items on production.
  10. 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:

CommandDescriptionPermission
/barn (aliases: lbarn, ahir)Shows how many barns you ownlbarn.use
/barn itemGives you the barn block itemlbarn.use

Admin Commands: (alias /lbarnadmin, supports tab completion)

CommandDescriptionPermission
/barnadmin helpShows the help pagelbarn.admin
/barnadmin give <player> [amount]Gives barn block itemslbarn.admin
/barnadmin givebooster <player> <boosterId>Gives a booster itemlbarn.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 consolelbarn.admin
/barnadmin gui [player]Opens the Admin Barn List (optionally filtered by owner)lbarn.admin
/barnadmin reloadReloads all configuration and storage; safely closes GUIs and restarts taskslbarn.admin
/barnadmin infoShows total barn and animal statisticslbarn.admin
/barnadmin resetReloads all barns from storagelbarn.admin

Permission Nodes:

PermissionDescriptionDefault
lbarn.useUse barn menus and commandseveryone
lbarn.adminFull admin access (implies lbarn.use)op
lbarn.bypassBypass barn capacity limitsop

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.

MenuSizeContent / Actions
Main Menu27Food Depository, Animals (x/y), Animal Shop, Storage, Upgrade, Pick Up Barn, Members, Booster, Close
Animal List54Paginated animals (45/page) with level, stage, 10-block growth bar, energy, food requirements, "requires food" warning, harvest-ready state
Animal Shop54Buyable types (unlocked by barn level) — price, growth time, product/reward, XP, themes; click to buy (add-then-pay with rollback)
Upgrade27Current level info; next level capacity/storage/multiplier/cost; click to upgrade (paid via Vault)
Booster54Free inventory — drop booster items in; on close/back, one booster of each kind is consumed and applied (leftovers returned)
Food Depository54The live food inventory — deposit/withdraw items directly; buttons: stats, back
Food Stats54Daily / weekly / monthly / all-time food consumption per food type
Storage54Products of all animals: left-click = take to inventory, right-click = sell instantly; Take All, Sell All, Drop (drops around the block), info guide, back
Members27Add member (chat prompt), list members; shift-right-click removes, click opens permissions
Member Permissions27Toggle per member: Food Depository access, Storage access, Add Animal, Booster use
Admin Barn List54All barns (owner/world/server/coords); click to manage; player search (anvil GUI); pageable
Admin Barn Management54Info summary + Teleport, View Animals, Give Animals, Apply Booster, Set Level, Members, Storage, Food Storage, Remove (two-click confirm)
Admin Give Animals54Pick one of the target's barns to add animals (capacity-aware)
Admin Add Animal54Choose animal type, type an amount in chat to add
Admin Booster54Apply any configured booster to the barn
Admin Set Level54Set the barn to any configured level directly

Animals

14 default animal types included in animals.yml. (Stage progression: BABY lv1 → TEEN lv5 → ADULT lv10).

TypePriceUnlock LevelFoodThemesProducts & Intervals
COW1001WHEAT, HAY_BLOCK3LEATHER x1/x2/x3 (20s/15s/10s)
SHEEP801WHEAT4WHITE_WOOL x1/x2/x3 (18/12/8)
PIG701CARROT, POTATO1PORKCHOP x1/x2/x3 (15/10/7)
CHICKEN4014 seed types1EGG x1/x2/x3 (12/8/5)
RABBIT602CARROT, DANDELION3RABBIT_HIDE x1/x2/x3 (15/10/6)
HORSE2503GOLDEN_APPLE, APPLE, HAY_BLOCK4LEATHER x2/x3/x5 (25/18/12)
GOAT1102WHEAT, CARROT1MILK_BUCKET x1/x2/x3 (18/12/8)
AXOLOTL1303TROPICAL_FISH3TROPICAL_FISH x1/x2/x3 (18/12/8)
COD502COD, SALMON1COD x1/x2/x3 (12/8/5)
TURTLE1504KELP1SCUTE x1/x2/x3 (22/15/10)
BEE902POPPY, DANDELION, SUNFLOWER1HONEYCOMB x1/x2/x3 (14/9/6)
FOX2004SWEET_BERRIES, GLOW_BERRIES2SWEET_BERRIES x2/x3/x5 (24/16/10)

Every type supports itemsadder: references for food items, icons and products.


Barn Levels

Configurable in barnlevels.yml:

LevelCapacityStorage SizeMultiplierUpgrade CostUnlocked Animals
110271.0500COW, SHEEP, PIG, CHICKEN
220271.52,000RABBIT, GOAT, COD, BEE
330362.08,000HORSE, AXOLOTL
445362.7525,000TURTLE, FOX
565453.580,000—
690454.5200,000—
7120456.0500,000—
8160458.00 (max)—

Boosters

Configurable in boosters.yml:

IDTypeEffectDuration
PRODUCTIONPRODUCTION2.0x production speed10 min
PRODUCTION_IIPRODUCTION3.0x production speed5 min
LEVELLEVEL1.5x growth/leveling speed5 min
LUCKCHANCE25% chance for +2 bonus items20 min
FOODFOOD0.5x food consumption10 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:
    1. prices.yml (default) — per-material prices defined by the admin
    2. economyshopgui / economyshopgui-premium — EconomyShopGUI sell prices
    3. shopguiplus — ShopGUIPlus sell prices
    4. 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/:

FilePurpose
config.ymlMain configuration (language, storage, spawner, hologram, feeding, economy, logging)
animals.ymlAnimal types: price, food, themes, growth curve, stages & products
barnlevels.ymlBarn level curve: capacity, storage size, multiplier, upgrade cost, unlocks
boosters.ymlBooster definitions + stack-mode
prices.ymlSell prices per material (when economy.provider: prices.yml)
messages_tr.yml / messages_en.ymlAll 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

  • Discord: squezsaz
Партнёрский материал

Сервер для плагина L-Barn - как у профи

Плагин L-Barn создан для серверов: на своём сервере вы настраиваете его под себя и решаете, кому играть. Создать сервер с плагином L-Barn для друзей можно за пару минут - BungeeHost всё уже подготовил.

Часто задаваемые вопросы

Совместимость

Minecraft: Java Edition

26.2.x26.1.x1.21.x1.20.x

Поддерживаемые окружения

Сервер

Ссылки

Создатели

Детали

Лицензия:
Опубликован:1 месяц назад
Обновлён:1 месяц назад
Главная