From 69818923fc5d8f05c27a48f6df450b22db2eafa7 Mon Sep 17 00:00:00 2001 From: tastybento Date: Sat, 13 Feb 2021 10:27:57 -0800 Subject: [PATCH] Setting hopper to null is valid Fixes https://github.com/BentoBoxWorld/Greenhouses/issues/75 --- src/main/java/world/bentobox/greenhouses/data/Greenhouse.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/world/bentobox/greenhouses/data/Greenhouse.java b/src/main/java/world/bentobox/greenhouses/data/Greenhouse.java index cc40135..2badd4e 100644 --- a/src/main/java/world/bentobox/greenhouses/data/Greenhouse.java +++ b/src/main/java/world/bentobox/greenhouses/data/Greenhouse.java @@ -156,8 +156,8 @@ public class Greenhouse implements DataObject { /** * @param v the roofHopperLocation to set */ - public void setRoofHopperLocation(Vector v) { - this.roofHopperLocation = v.toLocation(getWorld()); + public void setRoofHopperLocation(@Nullable Vector v) { + this.roofHopperLocation = v == null ? null : v.toLocation(getWorld()); } /**