Compatibility
Minecraft: Java Edition
Platforms
Tags
Creators
Details
AutoReplantCrop
๐ English
Version: 1.0.1 | API: Paper 26.1+ (Java 25) | Author: Duong2012G License: Apache-2.0 | Link: Modrinth
Harvest and replant with a single right-click. Out of the box every player can use it โ no permissions, tools or extra setup get in the way. Just right-click a fully grown crop: it is harvested and planted again at once, and the seed needed for the replant is taken from the crop's own drops. Requiring a hoe, ignoring sneaking, sending drops straight to the inventory and per-world / per-crop switches are optional settings for server admins.
Features
| Feature | Description |
|---|---|
| One-click harvest and replant | Right-click a fully grown crop with your main hand and it is harvested and reset to growth stage 0 in place. The crop block is never removed and placed again, so its state (for example the facing of cocoa pods) is kept. |
| Seed cost taken from the drops | One seed is held back from the crop's own drops and used for the replant. If a crop would normally drop 3 seeds, you receive 2 and the third one is planted. Nothing is created out of thin air. |
| Supported crops | Wheat, carrots, potatoes, beetroots, nether wart and cocoa. Each one can be switched off in crops. Replant items: wheat seeds, carrot, potato, beetroot seeds, nether wart, cocoa beans. |
| Fortune | Drops are calculated with the item in your main hand as the loot tool, so Fortune increases the drops exactly like when breaking the crop (one seed is still kept for the replant). Switch off with fortune-support. |
| Seed fallback | Some crops can drop no seed at all (for example beetroots). With take-seed-from-inventory one matching item is taken from your inventory โ main inventory, hotbar or off-hand. Plain seeds are used first; named / lore items only when nothing else is available. If there is no seed anywhere, harvest-without-seed decides: harvest without replanting, or leave the crop untouched (an action-bar hint tells the player, with the item name shown in the player's own client language). |
| Immature crops are never touched | Only fully grown crops react. Bone meal, block placement and every other vanilla interaction keep working on crops that are still growing. |
| Safe click handling | Once a fully grown crop is clicked, the click belongs to the plugin whatever the outcome (success, protection denial, no seed), so the held item (ender pearl, water bucket, block...) is never used by accident. The follow-up clicks the client sends right after โ the off-hand block click (once, within 250 ms) and a "use item in the air" click (within 100 ms) โ are swallowed too, so bone meal, blocks or throwables in the off-hand are not wasted on the replanted crop. |
| Protection plugin support | Fires a normal BlockBreakEvent for the player before anything changes, so protection plugins that work through that event can cancel it. If it is cancelled, the crop is left exactly as it was. The seed check runs before that event, so a refused harvest never looks like a real break to other plugins. |
| Break-like behaviour | Once the break event went through, the crop is always either replanted or removed โ it is never left fully grown. The full harvest goes through BlockDropItemEvent and the replant seed is taken from what is really delivered afterwards, so drop-multiplier plugins see and multiply the real harvest. Experience set on the break event is spawned, and the vanilla blocks mined statistic is counted. |
| Drop-plugin friendly | If another plugin calls setDropItems(false) on the break event (custom drops, auto-pickup...), the plugin adds no vanilla drops. The replant then takes its seed from the inventory (where such plugins usually put the items), or the crop is removed like a normal break. |
| Valid replanting only | A crop is only replanted where vanilla could plant it (soil / log still there, enough light for crops). Otherwise it is harvested and removed like a normal break and you keep every drop. |
| Per-player toggle | /arc toggle switches the feature off/on for yourself. The choice is saved on the player and survives restarts and relogs. /arc status shows the current state. |
| Admin tools | /arc toggle <player> and /arc status <player> (also from the console) manage other online players. |
| Game modes | Survival: normal behaviour. Creative: the crop is replanted for free and nothing drops, like vanilla creative breaking. Adventure and Spectator: ignored. |
| Effects | Arm swing, block-break particles, and the crop's own vanilla break and plant sounds (particles, sounds). |
| Modern messages | Every message supports MiniMessage (<green>, <gradient:...>, <click:...>) as well as legacy & codes and &#RRGGBB hex colours. Messages are parsed once when the config loads. |
| World restrictions | disabled-worlds, by world name (case-insensitive). |
| Folia | Declared Folia-supported. Everything runs on the region that owns the clicked block, shared state is thread-safe, and commands that touch other players go through the entity scheduler. |
| Lightweight | No dependencies, no scheduled tasks, no data files. The listener only does work when a player right-clicks a supported crop. |
Optional settings for server admins
| Setting | What it does |
|---|---|
Require a hoe (require-hoe) |
Only works while holding a hoe in the main hand (checked through the vanilla hoe item tag, so modded / future hoes work). Off by default. |
Ignore while sneaking (ignore-while-sneaking) |
Sneak + right-click behaves like vanilla, which is handy for placing blocks next to crops. Off by default. |
Drops to inventory (drops-to-inventory) |
Drops go straight into the player's inventory; whatever does not fit is dropped on the ground. Off by default. |
Per-crop switches (crops) |
Enable or disable wheat, carrots, potatoes, beetroots, nether wart and cocoa individually. |
Requirements
- A Paper server on Minecraft 26.1 or newer (compiled against the 26.1.2 API). Paper-based forks such as Purpur use the same API.
plugin.ymldeclaresapi-version: 26.1. - Java 25 (required by Minecraft 26.x itself)
- Paper API only: Spigot is not supported. Folia is declared supported (see Compatibility notes).
Installation
- Put
AutoReplantCrop-1.0.1.jarinto your server'splugins/folder. - Start the server once;
plugins/AutoReplantCrop/config.ymlis created. - Edit it and apply changes with
/arc reload(no restart needed).
Upgrading from 1.0.0 keeps your config.yml: keys that are missing fall back to the new defaults
automatically, and messages that use & colour codes keep working.
How to use
Right-click a fully grown crop with your main hand. That is all โ no sneaking and no special tool needed by default.
Auto-replant only triggers when all of these hold:
- the player has
autoreplantcrop.use(everyone does by default) and has not used/arc toggleto switch it off - the world is not listed in
disabled-worldsand the crop is enabled incrops - the crop is fully grown and the player is in Survival or Creative mode
- the player is not sneaking (only when
ignore-while-sneaking: true) and holds a hoe (only whenrequire-hoe: true) - a seed is available (drops or inventory), or
harvest-without-seedistrue - the player's own break is not cancelled by a protection plugin
Example with wheat:
| Wheat | Wheat seeds | |
|---|---|---|
| A normal break would drop | 1 | 3 |
| AutoReplantCrop gives you | 1 | 2 (1 seed is planted again) |
In Creative mode crops are replanted too, but nothing drops.
Commands & permissions
| Command | Permission | Description |
|---|---|---|
/arc toggle |
autoreplantcrop.use (default: everyone) |
Turn auto-replant on/off for yourself. Saved โ it survives restarts. |
/arc status |
autoreplantcrop.use |
Show whether auto-replant is on for you. |
/arc toggle <player> |
autoreplantcrop.admin (default: op) |
Turn auto-replant on/off for another online player. Works from the console. |
/arc status <player> |
autoreplantcrop.admin |
Show the state for another online player. Works from the console. |
/arc reload |
autoreplantcrop.admin |
Reload config.yml. |
The /arc command itself requires autoreplantcrop.use, which everyone has by default. To take the feature away
from a group, set autoreplantcrop.use to false for that group in your permissions plugin. Extra arguments
(for example /arc toggle a b) show the usage message instead of running.
Configuration
Everything lives in plugins/AutoReplantCrop/config.yml.
| Key | Default | Range | Description |
|---|---|---|---|
settings.require-hoe |
false |
Player must hold a hoe in the main hand. | |
settings.ignore-while-sneaking |
false |
Sneaking + right-click uses vanilla behaviour (no harvest). | |
settings.fortune-support |
true |
Use the main-hand item as the loot tool so Fortune increases the drops. If false, drops are always the un-enchanted amounts. |
|
settings.drops-to-inventory |
false |
Put drops straight into the inventory (overflow is dropped on the ground). | |
settings.take-seed-from-inventory |
true |
When the crop dropped no seed, take one matching item from the player's inventory or off-hand. | |
settings.harvest-without-seed |
true |
When no seed is available anywhere: true = harvest like a normal break (no replant), false = leave the crop untouched. |
|
settings.particles |
true |
Block-break particles on harvest. | |
settings.sounds |
true |
The crop's vanilla break and plant sounds. | |
settings.disabled-worlds |
[] |
Worlds (by name, case-insensitive) where the feature is disabled. | |
crops.wheat / .carrots / .potatoes / .beetroots / .nether_wart / .cocoa |
true |
Enable or disable each crop. | |
messages.* |
see file | prefix, toggle-on, toggle-off, toggle-other-on, toggle-other-off, status-on, status-off, status-other-on, status-other-off, reloaded, no-permission, players-only, player-not-found, usage, no-seed. MiniMessage or legacy & / &#RRGGBB codes; an empty string hides the message. Placeholders: {player}, {seed} (the item name, translated by each player's client). |
How the seed is chosen: the plugin first looks for the replant item in the crop's drops and holds one back. If the
drops contain none, it looks in the player's inventory and off-hand (when take-seed-from-inventory is on). If that
fails too, harvest-without-seed decides what happens.
The seed is taken from the drops after other plugins had their say on BlockDropItemEvent: plain seeds first, special named / lore seeds only if nothing else is there. If another plugin took the drops so that no seed is left, the plugin takes one from the inventory instead, and as a last resort removes the crop like a normal break โ a replant is never free. If BlockDropItemEvent is cancelled (for example by a region that forbids item drops), nobody receives the harvest, so the seed counts as taken from the discarded drops and the crop is replanted; a seed from the inventory is used first when there is one.
Messages: the prefix is joined to the text as a sibling, so a prefix like &a&l[ARC] does not recolour or embolden the message after it. A message that contains legacy codes (&a, &l, &#ff8800) is read as legacy text, every other message
is read as MiniMessage. Do not mix both styles inside one message.
Examples:
# Only allow right-click replanting with a hoe in hand, and keep sneaking free for placing blocks
settings:
require-hoe: true
ignore-while-sneaking: true
# Collect everything straight into the inventory
settings:
drops-to-inventory: true
# Never destroy a crop that cannot be replanted (e.g. a beetroot that dropped no seed)
settings:
harvest-without-seed: false
# Gradient prefix
messages:
prefix: "<gradient:#55ff55:#00aa00>AutoReplantCrop</gradient> <dark_gray>ยป</dark_gray> "
Missing keys fall back to the built-in defaults automatically, so an older config.yml keeps working after an update.
Compatibility notes
- Before changing anything, the plugin calls a regular
BlockBreakEventfor the player and the crop. Region and claim plugins that protect against block breaking (WorldGuard, GriefPrevention, Lands, Towny...) therefore apply automatically. - Drops are spawned through a regular
BlockDropItemEvent, so plugins that hook that event (drop multipliers, auto-pickup / telekinesis style plugins) can see and change them. - Folia: declared supported with
folia-supported: true. The code was written for Folia's rules (only the clicked block's region is touched, no global state without thread-safety, other players are handled through the entity scheduler), but it has not been run on a Folia server yet โ please report any problem. - The plugin has no hard or soft dependencies.
Known limitations
- The
BlockBreakEventis a simulated break: the crop block itself stays in place and is only reset to growth stage 0. Plugins that listen to the event (logging, statistics, skills) see it as a normal break of a fully grown crop. NoBlockPlaceEventis fired for the replant, so a rollback plugin restores the grown crop rather than the replanted one. - The A Seedy Place advancement (and other "placed a block" triggers) cannot be triggered by a replant: the Bukkit API has no way to award them.
- If another plugin cancels
BlockDropItemEventand hands the drops out somewhere other than the player's inventory (a virtual backpack, for example), the replant seed cannot be recovered from the inventory and that replant is free. - The tool takes no durability damage. This matches vanilla, where breaking instantly-breaking blocks such as crops does not wear tools.
- If the inventory seed fallback finds only special items (custom name, lore or other item data), one of them is used, because vanilla accepts any seed item for planting. Plain seeds are always used first.
- Sweet berry bushes (already harvestable in vanilla), torchflowers, pitcher plants, melon / pumpkin stems and sugar cane are not supported.
Building from source
Requirements: JDK 25 and Maven 3.9+.
mvn clean package
The finished plugin is written to target/AutoReplantCrop-1.0.1.jar. The Paper API version is the
paper.api.version property in pom.xml.
Changelog
See CHANGELOG.md.

