Skip to main content

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​

  1. Individual Mode - Each crop respawns on its own, fully grown, after a configurable delay (default 10 minutes)
  2. Group Mode - Every harvested crop in a region respawns together on a shared timer, with a hologram countdown
  3. Instant Mode - A harvested crop resets to a seedling and regrows naturally; it cannot be broken until it is mature

Drop Control​

  1. Drop Filtering - All vanilla drops, harvest items only (no seeds), or nothing
  2. Drop Destination - Drops fall on the ground or go straight into the player's inventory (what does not fit falls on the ground)
  3. Fortune - Drops are rolled with the player's tool, so Fortune works as in vanilla

Protection​

  1. Protection Bypass - Per region, harvest before WorldGuard or claim plugins can refuse it, so players can farm in protected areas
  2. Trample Protection - Per region, players and mobs cannot trample the farmland
  3. Moisture Protection - Per region, farmland never dries out
  4. 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​

  1. Wand Selection - Select a region's corners with the selection tools, then confirm
  2. Region Resize - Re-select the bounds of a region without losing its settings
  3. 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
  4. Enable/Disable - Switch a region off without deleting it

Holograms​

  1. Group Countdown - A floating hologram shows the time until the next group respawn
  2. Position Control - Auto-centred above the region, moved to any spot, or hidden per region
  3. No Dependency - Holograms are drawn natively; DecentHolograms, HolographicDisplays and FancyHolograms are used when installed

Management​

  1. Admin Menu - /crops admin opens a hub with the plugin-wide Configuration and a list of every region
  2. Region Settings Menu - Mode, drops, protections, delay, hologram and status of a region in one screen
  3. PlaceholderAPI Integration - Region count, pending crops, mode and countdown
  4. 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​

CommandDescriptionPermission
/cropsShow the help menu-
/crops help [page]Paginated help-
/crops listList all crop regionsnexalcrops.use
/crops info \<name>Show region detailsnexalcrops.use

Admin Commands​

CommandDescriptionPermission
/crops adminOpen the admin menu (the admin help from the console)nexalcrops.admin
/crops admin help [page]Show the admin commandsnexalcrops.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 menunexalcrops.admin
/crops admin resize \<name>Re-select a region's boundsnexalcrops.admin
/crops admin sethologram \<name>Move a region's hologram to your positionnexalcrops.admin
/crops admin reloadReload config.yml and messages.ymlnexalcrops.admin
/crops admin exportExport regions and pending crops to exports/nexalcrops.admin
/crops admin importImport 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​

PermissionDescriptionDefault
nexalcrops.useBasic player commands (list, info)true
nexalcrops.adminAll admin commands and menus; clicking a hologram opens its region's settingsop
nexalcrops.*All permissionsop

Creating a Region​

  1. Run /crops admin create farmzone. Your inventory is kept aside and the selection tools go in your hotbar.
  2. 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.
  3. Use the lime Confirm block to finish, or the barrier to cancel. Your inventory comes back either way.
  4. 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:

ButtonOpens
Configuration (comparator)The plugin-wide settings, saved to config.yml
Regions (wheat)Every region, 45 per page; click one to open its settings

Configuration​

RowSettings
Defaults for new regionsMode, respawn delay, drop filter, drop destination, protection bypass, trample protection, moisture protection
HologramsHolograms on/off, height above auto-centred regions
CropsWheat, 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]
SlotItemFunction
(0,4)WheatName, world, bounds, pending crops
(1,2)ComparatorCycle replant mode (Individual, Group, Instant)
(1,4)HopperCycle drop filter (All, Harvest Only, None)
(1,6)Chest / Ender ChestToggle drop destination (Ground, Inventory)
(2,2)Lime / Red ConcreteToggle protection bypass
(2,4)Lime / Red ConcreteToggle trample protection
(2,6)Lime / Red ConcreteToggle moisture protection
(3,4)ClockRespawn delay: left +30s, right -30s, shift left +5m, shift right -5m (minimum 30s)
(4,0)ArrowBack to the region list
(4,2)Armor StandHologram: 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 ConcreteEnable or disable the region
(4,8)BarrierClose

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​

CropMaterialBase Block
WheatWHEATFarmland
CarrotsCARROTSFarmland
PotatoesPOTATOESFarmland
BeetrootsBEETROOTSFarmland
Nether WartNETHER_WARTSoul 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​

FilterBehavior
ALLAll vanilla drops (e.g. wheat and wheat seeds)
HARVEST_ONLYNo seeds (e.g. wheat only)
NONENo 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​

PlaceholderDescription
%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):

  1. /crops admin export (writes plugins/NexalCrops/exports/export-\<time>.json)
  2. Set storage.type in config.yml
  3. Restart the server (/crops admin reload does not reconnect storage)
  4. /crops admin import (reads the newest export; regions and pending crops with the same id are overwritten)

Database Schema​

crop_regions​

ColumnTypeDescription
idVARCHAR(64) PKRegion name
worldVARCHAR(64)World name
minX, minY, minZINTMinimum corner
maxX, maxY, maxZINTMaximum corner
modeVARCHAR(16)INDIVIDUAL, GROUP or INSTANT
respawn_delayINTDelay in seconds
drop_filterVARCHAR(16)ALL, HARVEST_ONLY or NONE
drop_destinationVARCHAR(16)GROUND or INVENTORY
bypass_protectionBOOLEANProtection bypass
prevent_trampleBOOLEANTrample protection
prevent_moisture_lossBOOLEANMoisture protection
enabledBOOLEANRegion enabled
hologram_x, hologram_y, hologram_zDOUBLECustom hologram position (null: auto-centred)
hologram_hiddenBOOLEANHologram hidden (added in 1.0.3; created automatically on older tables)
last_group_respawnBIGINTLast group respawn timestamp

crop_pending​

ColumnTypeDescription
idVARCHAR(128) PKComposite key (world❌y:z)
region_idVARCHAR(64)Parent region
worldVARCHAR(64)World name
x, y, zINTBlock coordinates
crop_typeVARCHAR(32)Material name
harvest_timeBIGINTHarvest 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​

  1. Place NexalCrops.jar in your plugins folder
  2. (Optional) Install PlaceholderAPI for placeholder support
  3. Restart the server
  4. Edit config.yml and messages.yml as needed, or use /crops admin
  5. Create your first region with /crops admin create \<name>

License​

Proprietary - Nexal Studios