From 32b71f0d7869c16ed1df3d4418a5fbde94994b28 Mon Sep 17 00:00:00 2001 From: Brianna O'Keefe Date: Sun, 4 Nov 2018 00:45:49 -0500 Subject: [PATCH] null fix --- .../src/main/java/com/songoda/epicfarming/tasks/FarmTask.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/EpicFarming-Plugin/src/main/java/com/songoda/epicfarming/tasks/FarmTask.java b/EpicFarming-Plugin/src/main/java/com/songoda/epicfarming/tasks/FarmTask.java index abd0916..d27904a 100644 --- a/EpicFarming-Plugin/src/main/java/com/songoda/epicfarming/tasks/FarmTask.java +++ b/EpicFarming-Plugin/src/main/java/com/songoda/epicfarming/tasks/FarmTask.java @@ -49,8 +49,10 @@ public class FarmTask extends BukkitRunnable { } for (Block block : getCrops(farm, true)) { + if (!CropType.isCrop(block.getType())) continue; Crops crop = (Crops) block.getState().getData(); + // Add to GrowthTask plugin.getGrowthTask().addLiveCrop(block.getLocation(), new Crop(block.getLocation(), farm));