# Farming Zones

### **🌾 Farming Zones** (v2.1.2+)

Farming Zones let you create regions where players can farm crops that automatically regenerate after a set amount of time. Supports per-player farming so multiple players can farm in the same zone simultaneously without interfering with each other.

{% hint style="info" %}
**Version 2.1.2+** — If you are on a legacy version, see the Farming Zones (Legacy) down below.
{% endhint %}

***

### Requirements

* [WorldGuard](https://enginehub.org/worldguard/) for region management
* [PacketEvents ](https://modrinth.com/plugin/packetevents)*(optional — required for `player-only` mode)*

***

### 1. Setup

&#x20;Plant & Grow Your Crops Wheat must be **planted and fully grown** in the area before creating a farming zone.

### 2. Create the Farming Zone

Run the following command and click the new zone button in the menu to begin your selection: **/hoe farmingzones**

Follow the steps shown in chat using the selection wand to define your zone area.

#### 3. Enable in config.yml

Ensure the following options are set in `config.yml`:

```yaml
Farming-Zones:
  enabled: true
  packetcrops: true
```

#### 4. Set the Crop for the Zone

You can either use the Crop Selector GUI (configured in \`cropselector.yml\`) or set a crop manually with:

/hoe setcrop {player} {material}

{% hint style="info" %}
ItemsAdder, Nexo & Oraxen are supported for material types, instead of a material you can use itemsadder:yourmodel oraxen:yourmodel nexo:yourmodel
{% endhint %}

{% hint style="danger" %}
Any material set must also be added to \`Leaderboard-Materials:\` in \`leaderboards.yml\`. \*\*A server restart is required\*\* after adding the new materials.
{% endhint %}

#### &#x20;Region Flags

You still need a WorldGuard region with the correct flags applied. Use \`/rg define {name}\` and then set:

/rg flag {region} build allow

\*\*or:\*\*

/rg flag {region} rivalharvesterhoes allow

&&#x20;

/rg flag {region} block-break deny

/rg flag {region} block-place deny

/rg flag {region} deny-message -e

***

### Configuration

The region config and structure remain the same as the legacy version:

```yaml
Farming-Zones:
  enabled: true          # Enable the Farming Zones module
  packetcrops: true      # Enable packet-based crops — requires PacketEvents
  player-only: false     # Only the farming player sees their own crops break
  global: false          # If true, every crop acts as a farming zone crop
                         # and regions are ignored
  regions:
    - 'regionname'       #Regions does nothing on this version
  regen-time: 20         # Default crop regen time in seconds
  custom-times:          # Override regen time per crop type
    WHEAT: 5
  particles:
    enabled: true        # Show particles when a crop regenerates
    particle: 'VILLAGER_HAPPY'
```

### **🌾 Farming Zones (Legacy)**

\
Farming Zones let you create regions where players can farm crops that automatically regenerate after a set amount of time. Supports per-player farming so multiple players can farm in the same zone simultaneously without interfering with each other.

{% hint style="danger" %}
&#x20;**Legacy Version** — If you are on version 2.1.2 or above, see the Farming Zones (v2.1.2+) above
{% endhint %}

***

### Requirements

* [WorldGuard](https://enginehub.org/worldguard/) for region management
* [ProtocolLib](https://www.spigotmc.org/resources/protocollib.1997/) *(optional — required for `player-only` mode)*

***

### Setup

#### 1. Create a WorldGuard Region

Define a WorldGuard region over the area you want to use as a farming zone:

```
/rg define {name}
```

#### 2. Set Region Flags

Apply the following flags to your region:

```
/rg flag {region} build allow
```

**or** (if you prefer a more restrictive setup):

```
/rg flag {region} rivalharvesterhoes allow
```

```
/rg flag {region} block-break deny
/rg flag {region} block-place deny
/rg flag {region} deny-message -e
```

#### 3. Add the Region to config.yml

Add your region name to the `regions` list in `config.yml` and configure the module to your liking (see below).

***

### Configuration

```yaml
Farming-Zones:
  enabled: true          # Enable the Farming Zones module
  player-only: false     # Only the farming player sees their own crops break
                         # (other players' crops remain visible) — requires ProtocolLib
  global: false          # If true, every crop acts as a farming zone crop
                         # and regions are ignored
  regions:
    - 'regionname'
  regen-time: 20         # Default crop regen time in seconds
  custom-times:          # Override regen time per crop type
    WHEAT: 5
  particles:
    enabled: true        # Show particles when a crop regens
    particle: 'VILLAGER_HAPPY'
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.rivaldev.xyz/rival-tools/rival-harvester-hoes/farming-zones.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
