Source-checkedAdmin & protection

Farm Protection for MC 1.16 - 1.21

by TaskID · for Minecraft

Prevent players and mobs from destroying farms / farmland!

25KDownloads
6 yr agoLast updated
Spigot · PaperLoaders
1.16Latest game version

About Farm Protection for MC 1.16 - 1.21

From SpigotMC

Prevent players and mobs from destroying farms / farmland!

FarmProtection for MC 1.16
​
This is a simple plugin to prevent players and mobs from destroying farm / farmland by walking or jumping on it.

Tested on 1.16.4 and 1.16.5, should work for lower 1.16 versions too.

<button type="button" class="button bbCodeSpoilerButton ToggleTrigger Tooltip JsOnly" title="Click to reveal or hide spoiler" data-target="> .SpoilerTarget">Spoiler: Event Source Code</button>
If you just want to know how it's working to use it in your own plugins, here's the code.
Code (Java):
import org.bukkit.Material ;

import org.bukkit.block.Block ;
import org.bukkit.event.EventHandler ;
import org.bukkit.event.Listener ;
import org.bukkit.event.block.Action ;
import org.bukkit.event.entity.EntityInteractEvent ;
import org.bukkit.event.player.PlayerInteractEvent ;

public class FarmProtectionListener implements Listener {

&nbsp; &nbsp; @EventHandler
&nbsp; &nbsp; public void onEntityInteract (EntityInteractEvent event ) {
&nbsp; &nbsp; &nbsp; &nbsp; Block block = event. getBlock ( ) ;
&nbsp; &nbsp; &nbsp; &nbsp; if (block != null &amp;&amp; block. getType ( ) == Material. FARMLAND ) {
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; event. setCancelled ( true ) ;
&nbsp; &nbsp; &nbsp; &nbsp; }
&nbsp; &nbsp; }

&nbsp; &nbsp; @EventHandler
&nbsp; &nbsp; public void onPlayerInteract (PlayerInteractEvent event ) {
&nbsp; &nbsp; &nbsp; &nbsp; if (event. getAction ( ) == <a target="_blank" rel="nofollow" href="http://www.google.com/search?hl=en&amp;q=allinurl%3Adocs.oracle.com+javase+docs+api+action">Action. PHYSICAL ) {
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (event. getClickedBlock ( ). getType ( ) == Material. FARMLAND ) {
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; event. setCancelled ( true ) ;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }
&nbsp; &nbsp; &nbsp; &nbsp; }
&nbsp; &nbsp; }

}

Highlights

From source data

Game versions

Built for Minecraft 1.16.

Loaders

Runs on Spigot and Paper.

Footprint

Rated a light load on a server.

Farm Protection for MC 1.16 - 1.21 on Nxeon

From our catalogue
One-click install
Supported on Nxeon Minecraft servers, for Paper servers. We download it from SpigotMC, place it, and restart the server.
Server side
Required on the server
Server type needed
Spigot, Paper
Server load
light
Smallest plan we suggest
Minecraft — 2 GB (2 GB RAM). This follows our own load rating above, not a benchmark.
Latest build
1.0.0, released 2020-11-04

Game versions by loader

LoaderGame versionsNewest
Paper1.161.16
Spigot1.161.16

From 1 recorded build of Farm Protection for MC 1.16 - 1.21.

Run Farm Protection for MC 1.16 - 1.21 on a Minecraft server

Pick a server or deploy a new one above; it is installed in one click.

What kind of mod it is

From the catalog
Listed on SpigotMC as “Admin”

Admin & protection

Permissions, moderation, anti-cheat and land protection for the people running the server.

Runs on your server

From source side support

SpigotMC lists Farm Protection for MC 1.16 - 1.21 as required on the server. Check its SpigotMC page to see whether players need it too.

Compatibility

Game
Minecraft
Loaders
SpigotPaper
Runs on
Serverrequired on the server
Game versions
1.16
Requires
One-click install needs a Paper server.

Verified at the source

  • ✓SpigotMCOfficial listing, checked 2026-10-02Open ↗
  • ✓AuthorTaskID, as published on SpigotMC
  • ✓LicenseNot published by the sourceFree

Farm Protection for MC 1.16 - 1.21, answered

Generated from the mod’s own source data.

Do my players need to install Farm Protection for MC 1.16 - 1.21?

SpigotMC lists Farm Protection for MC 1.16 - 1.21 as required on the server. Check its SpigotMC page to see whether players need it too.

Which loaders does it support?

Spigot and Paper.

Is it free?

Yes. Farm Protection for MC 1.16 - 1.21 is free to download from SpigotMC.

How do I add it to my Nxeon server?

Use “Add to a server” on this page, or open NxLabs from your dashboard. We install it, restart your server and switch it on.

NxLabs

Run Farm Protection for MC 1.16 - 1.21 on a Minecraft server.

Deploy in about a minute from $4.99 a month, then add Farm Protection for MC 1.16 - 1.21 in one click.