Nexal Crops
Automatic crop region management for Minecraft servers. Define regions where crops respawn after harvest, with three replant modes, configurable drops, protection bypass, farmland protection, hologram countdowns, an admin menu for plugin-wide settings and a settings menu for every region.
Features
Replant Modes
- Individual Mode - Each crop respawns on its own, fully grown, after a configurable delay (default 10 minutes)
- Group Mode - Every harvested crop in a region respawns together on a shared timer, with a hologram countdown
- Instant Mode - A harvested crop resets to a seedling and regrows naturally; it cannot be broken until it is mature
Drop Control
- Drop Filtering - All vanilla drops, harvest items only (no seeds), or nothing
- Drop Destination - Drops fall on the ground or go straight into the player's inventory (what does not fit falls on the ground)
- Fortune - Drops are rolled with the player's tool, so Fortune works as in vanilla
Protection
- Protection Bypass - Per region, harvest before WorldGuard or claim plugins can refuse it, so players can farm in protected areas
- Trample Protection - Per region, players and mobs cannot trample the farmland
- Moisture Protection - Per region, farmland never dries out
- Crop Spot Protection - Immature crops, and the soil under a crop or under a crop waiting to respawn, cannot be broken, so a farm never loses spots
Regions
- Wand Selection - Select a region's corners with the selection tools, then confirm
- Region Resize - Re-select the bounds of a region without losing its settings
- Overlap and Name Checks - Regions cannot share blocks or span two worlds; names are checked before selection starts, and names that differ only by case are refused
- Enable/Disable - Switch a region off without deleting it
Holograms
- Group Countdown - A floating hologram shows the time until the next group respawn
- Position Control - Auto-centred above the region, moved to any spot, or hidden per region
- No Dependency - Holograms are drawn natively; DecentHolograms, HolographicDisplays and FancyHolograms are used when installed
Management
- Admin Menu -
/crops adminopens a hub with the plugin-wide Configuration and a list of every region - Region Settings Menu - Mode, drops, protections, delay, hologram and status of a region in one screen
- PlaceholderAPI Integration - Region count, pending crops, mode and countdown
- Dual Storage - JSON file or MySQL/MariaDB, with export and import to switch between them
Technologies
- Spigot/Paper API 1.20.1+ - Minecraft server API
- Utilizer - Configuration, messages, items, tasks, menus, holograms
- ACF - Command framework
- nexal-core - JSON and SQL persistence (MariaDB/MySQL), region selection, help menus
- PlaceholderAPI - Placeholder integration (optional)
Commands
Player Commands
| Command | Description | Permission |
|---|---|---|
/crops | Show the help menu | - |
/crops help [page] | Paginated help | - |
/crops list | List all crop regions | nexalcrops.use |
/crops info \<name> | Show region details | nexalcrops.use |
Admin Commands
| Command | Description | Permission |
|---|---|---|
/crops admin | Open the admin menu (the admin help from the console) | nexalcrops.admin |
/crops admin help [page] | Show the admin commands | nexalcrops.admin |
/crops admin create \<name> | Create a new region (starts the selection) | nexalcrops.admin |
/crops admin delete \<name> | Delete a region and its pending crops (also from the console) | nexalcrops.admin |
/crops admin settings \<name> | Open a region's settings menu | nexalcrops.admin |
/crops admin resize \<name> | Re-select a region's bounds | nexalcrops.admin |
/crops admin sethologram \<name> | Move a region's hologram to your position | nexalcrops.admin |
/crops admin reload | Reload config.yml and messages.yml | nexalcrops.admin |
/crops admin export | Export regions and pending crops to exports/ | nexalcrops.admin |
/crops admin import | Import the newest file in exports/ | nexalcrops.admin |
Aliases: /crop, /nexalcrops
Region names use up to 32 letters, digits, - and _. Commands find a region whatever the case of its name; two regions cannot have names that differ only by case.
Permissions
| Permission | Description | Default |
|---|---|---|
nexalcrops.use | Basic player commands (list, info) | true |
nexalcrops.admin | All admin commands and menus; clicking a hologram opens its region's settings | op |
nexalcrops.* | All permissions | op |
Creating a Region
- Run
/crops admin create farmzone. Your inventory is kept aside and the selection tools go in your hotbar. - Left-click a block with the Selection Wand (golden axe) for Point 1, right-click one for Point 2. The red and blue concrete set a point at your feet instead.
- Use the lime Confirm block to finish, or the barrier to cancel. Your inventory comes back either way.
- The region starts with the defaults from
config.yml. Change them in/crops admin settings farmzone, or through/crops admin> Regions.
The region must include the crops; include the farmland below them too so trample and moisture protection cover it. Both corners must be in the same world.
While a region is enabled, players cannot break its immature crops or the farmland (soul sand) under a crop or under a crop waiting to respawn. To rebuild a farm, disable the region in its settings menu, make the changes, then enable it again.
Admin Menu
/crops admin opens a hub:
| Button | Opens |
|---|---|
| Configuration (comparator) | The plugin-wide settings, saved to config.yml |
| Regions (wheat) | Every region, 45 per page; click one to open its settings |
Configuration
| Row | Settings |
|---|---|
| Defaults for new regions | Mode, respawn delay, drop filter, drop destination, protection bypass, trample protection, moisture protection |
| Holograms | Holograms on/off, height above auto-centred regions |
| Crops | Wheat, carrots, potatoes, beetroots and nether wart on/off (at least one stays on) |
Toggles are lime (on) or red (off) concrete. Numbers: left click up, right click down, shift click for bigger steps.
Region Settings
Row 0: [ ] [ ] [ ] [ ] [INFO] [ ] [ ] [ ] [ ]
Row 1: [ ] [ ] [MODE] [ ] [FLTR] [ ] [DEST] [ ] [ ]
Row 2: [ ] [ ] [BYPS] [ ] [TRMP] [ ] [MOIS] [ ] [ ]
Row 3: [ ] [ ] [ ] [ ] [DLAY] [ ] [ ] [ ] [ ]
Row 4: [BACK] [ ] [HOLO] [ ] [ ] [ ] [ENBL] [ ] [CLOS]
| Slot | Item | Function |
|---|---|---|
| (0,4) | Wheat | Name, world, bounds, pending crops |
| (1,2) | Comparator | Cycle replant mode (Individual, Group, Instant) |
| (1,4) | Hopper | Cycle drop filter (All, Harvest Only, None) |
| (1,6) | Chest / Ender Chest | Toggle drop destination (Ground, Inventory) |
| (2,2) | Lime / Red Concrete | Toggle protection bypass |
| (2,4) | Lime / Red Concrete | Toggle trample protection |
| (2,6) | Lime / Red Concrete | Toggle moisture protection |
| (3,4) | Clock | Respawn delay: left +30s, right -30s, shift left +5m, shift right -5m (minimum 30s) |
| (4,0) | Arrow | Back to the region list |
| (4,2) | Armor Stand | Hologram: left click moves it to you, right click hides or shows it, shift left resets it to auto-centred. The lore says when holograms are switched off for every region in Configuration |
| (4,6) | Lime / Red Concrete | Enable or disable the region |
| (4,8) | Barrier | Close |
Every change is confirmed in chat with a sound; both come from messages.yml.
Configuration
config.yml
# Where regions and pending crops are stored.
# Switching: /crops admin export, change type, restart the
# server, then /crops admin import.
storage:
# "json" (plugins/NexalCrops/data.json) or "sql" (MySQL/MariaDB)
type: "json"
sql:
host: "localhost"
port: 3306
database: "nexalcrops"
username: "root"
password: ""
# Settings a new region starts with.
defaults:
mode: "INDIVIDUAL" # INDIVIDUAL, GROUP or INSTANT
respawn-delay: 600 # seconds
drop-filter: "ALL" # ALL, HARVEST_ONLY or NONE
drop-destination: "GROUND" # GROUND or INVENTORY
bypass-protection: false
prevent-trample: true
prevent-moisture-loss: true
# Crops that are harvested and respawned inside regions (Material names)
supported-crops:
- "WHEAT"
- "CARROTS"
- "POTATOES"
- "BEETROOTS"
- "NETHER_WART"
hologram:
enabled: true
# GROUP regions. Placeholders: %region%, %countdown%
lines:
- "<gradient:#E67E22:#EB984E>\<bold>Crop Region\</bold>\</gradient>"
- "\<gray>%region%\</gray>"
- ""
- "<gradient:#AAAAAA:#BBBBBB>Next respawn in:\</gradient>"
- "<gradient:#FFC107:#FFCD38>%countdown%\</gradient>"
# INDIVIDUAL and INSTANT regions. Placeholders: %region%
lines-no-timer:
- "<gradient:#E67E22:#EB984E>\<bold>Crop Region\</bold>\</gradient>"
- "\<gray>%region%\</gray>"
y-offset: 3.0 # blocks above the top of an auto-centred region
Changes to config.yml apply when the file is saved, except storage, which needs a restart.
messages.yml
Every message is customizable with MiniMessage gradients, sounds and titles, including the words filled into messages (values: enabled/disabled, mode, filter and destination names), the setting names (setting-names) and the menu click sound (sounds.click).
- Primary:
<gradient:#E67E22:#EB984E>(harvest orange) - Secondary:
<gradient:#F0B27A:#F5CBA7>(light orange) - Success:
<gradient:#2ECC71:#52D68A>(green,✔) - Error:
<gradient:#FF5252:#FF7070>(red,✘) - Warning:
<gradient:#FFC107:#FFCD38>(gold)
A messages.yml from an older version keeps working: messages added since fall back to the bundled text until you add them.
Replant Mode Details
Individual
Each crop tracks its own harvest time. Once the region's delay has passed since that crop was harvested, it respawns fully grown. Other crops are unaffected.
Group
All crops share one timer. When it runs out, every harvested crop in the region respawns at once and the timer restarts. The hologram shows the countdown.
Instant
A harvested mature crop resets to a seedling and grows naturally; the block is never removed and cannot be broken while growing. Crops harvested while the region was in another mode respawn right away when it switches to Instant.
A crop respawns only into an empty spot on its farmland (soul sand for nether wart). If a block was placed in the spot, or the soil is gone, the spot is dropped from the queue and nothing is overwritten.
Supported Crops
| Crop | Material | Base Block |
|---|---|---|
| Wheat | WHEAT | Farmland |
| Carrots | CARROTS | Farmland |
| Potatoes | POTATOES | Farmland |
| Beetroots | BEETROOTS | Farmland |
| Nether Wart | NETHER_WART | Soul Sand |
Turn crops on or off in the Configuration menu or under supported-crops. Other ageable crops that grow on farmland (for example TORCHFLOWER_CROP) can be added by name. Crops that grow on anything else (cocoa, sweet berries) are not supported: they would never respawn.
Drop Filter Details
| Filter | Behavior |
|---|---|
ALL | All vanilla drops (e.g. wheat and wheat seeds) |
HARVEST_ONLY | No seeds (e.g. wheat only) |
NONE | No drops at all |
Protection Bypass
With bypass on, crop breaking is handled at the LOWEST event priority, before protection plugins like WorldGuard, so players can harvest in protected areas.
With bypass off, crop breaking is handled at HIGH priority and skipped when another plugin cancelled it, so protection plugins decide.
PlaceholderAPI Placeholders
| Placeholder | Description |
|---|---|
%nexalcrops_region_count% | Total number of regions |
%nexalcrops_active_regions% | Number of enabled regions |
%nexalcrops_pending_crops% | Pending crops across all regions |
%nexalcrops_region_\<name>_mode% | Replant mode of a region (INDIVIDUAL, GROUP, INSTANT) |
%nexalcrops_region_\<name>_pending% | Pending crops in a region |
%nexalcrops_region_\<name>_countdown% | Time until a Group region's next respawn; values.no-countdown (-) for other modes |
For a region that does not exist, the region placeholders show values.no-region (-).
Storage and Migration
Data is saved in the background: harvests and menu clicks never wait for the disk or the database. With JSON storage, data.json is written a moment after each change, so a crash loses at most the last moment of changes. If a save fails, online admins get a warning (at most once a minute) and the details go to the console. If the storage cannot be opened at startup (for example wrong SQL settings), the plugin logs why and disables itself; fix config.yml and restart.
To move from JSON to SQL (or back):
/crops admin export(writesplugins/NexalCrops/exports/export-\<time>.json)- Set
storage.typeinconfig.yml - Restart the server (
/crops admin reloaddoes not reconnect storage) /crops admin import(reads the newest export; regions and pending crops with the same id are overwritten)
Database Schema
crop_regions
| Column | Type | Description |
|---|---|---|
| id | VARCHAR(64) PK | Region name |
| world | VARCHAR(64) | World name |
| minX, minY, minZ | INT | Minimum corner |
| maxX, maxY, maxZ | INT | Maximum corner |
| mode | VARCHAR(16) | INDIVIDUAL, GROUP or INSTANT |
| respawn_delay | INT | Delay in seconds |
| drop_filter | VARCHAR(16) | ALL, HARVEST_ONLY or NONE |
| drop_destination | VARCHAR(16) | GROUND or INVENTORY |
| bypass_protection | BOOLEAN | Protection bypass |
| prevent_trample | BOOLEAN | Trample protection |
| prevent_moisture_loss | BOOLEAN | Moisture protection |
| enabled | BOOLEAN | Region enabled |
| hologram_x, hologram_y, hologram_z | DOUBLE | Custom hologram position (null: auto-centred) |
| hologram_hidden | BOOLEAN | Hologram hidden (added in 1.0.3; created automatically on older tables) |
| last_group_respawn | BIGINT | Last group respawn timestamp |
crop_pending
| Column | Type | Description |
|---|---|---|
| id | VARCHAR(128) PK | Composite key (world❌y:z) |
| region_id | VARCHAR(64) | Parent region |
| world | VARCHAR(64) | World name |
| x, y, z | INT | Block coordinates |
| crop_type | VARCHAR(32) | Material name |
| harvest_time | BIGINT | Harvest timestamp |
Dependencies
- Required: Spigot or Paper 1.20.1+
- Optional: PlaceholderAPI (for placeholders)
- Optional: DecentHolograms, HolographicDisplays or FancyHolograms. Not needed: holograms are drawn natively without them.
Installation
- Place
NexalCrops.jarin your plugins folder - (Optional) Install PlaceholderAPI for placeholder support
- Restart the server
- Edit
config.ymlandmessages.ymlas needed, or use/crops admin - Create your first region with
/crops admin create \<name>
License
Proprietary - Nexal Studios