From 0056ed92f35fd393db65e6217f67f40942d0e103 Mon Sep 17 00:00:00 2001 From: Brianna Date: Sun, 16 Feb 2020 09:42:06 -0500 Subject: [PATCH] Null check --- src/main/java/com/songoda/epicfarming/tasks/FarmTask.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/songoda/epicfarming/tasks/FarmTask.java b/src/main/java/com/songoda/epicfarming/tasks/FarmTask.java index a8e5cfb..d37d1e2 100644 --- a/src/main/java/com/songoda/epicfarming/tasks/FarmTask.java +++ b/src/main/java/com/songoda/epicfarming/tasks/FarmTask.java @@ -82,7 +82,7 @@ public class FarmTask extends BukkitRunnable { Block b2 = block.getWorld().getBlockAt(bx + fx, by + fy, bz + fz); CompatibleMaterial mat = CompatibleMaterial.getMaterial(b2); - if (!mat.isCrop() || !CropType.isGrowableCrop(mat.getBlockMaterial())) continue; + if (mat == null || !mat.isCrop() || !CropType.isGrowableCrop(mat.getBlockMaterial())) continue; if (add) { farm.addCachedCrop(b2);