Disables trampling if you wear leather boots.
Should also work in older versions.
Current code:
Code (Text):
private static void preventFarmland(Cancellable event, @Nullable Block block, Entity entity) {
if (block != null && block.getBlockData() instanceof Farmland
&& entity instanceof LivingEntity le
&& le.getEquipment() != null
&& le.getEquipment().getItem(EquipmentSlot.FEET).getItemMeta() instanceof LeatherArmorMeta) {
event.setCancelled(true);
}
}
You can decompile if you want.