From a51e9860f57a3640cef837897086ccf290c82eb0 Mon Sep 17 00:00:00 2001 From: tastybento Date: Tue, 2 Jul 2024 11:21:28 -0700 Subject: [PATCH] Return the pladdon that was made --- .../java/world/bentobox/greenhouses/GreenhousesPladdon.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main/java/world/bentobox/greenhouses/GreenhousesPladdon.java b/src/main/java/world/bentobox/greenhouses/GreenhousesPladdon.java index 336bdfb..6a3c182 100644 --- a/src/main/java/world/bentobox/greenhouses/GreenhousesPladdon.java +++ b/src/main/java/world/bentobox/greenhouses/GreenhousesPladdon.java @@ -10,9 +10,13 @@ import world.bentobox.bentobox.api.addons.Pladdon; */ public class GreenhousesPladdon extends Pladdon { + private Addon addon; @Override public Addon getAddon() { - return new Greenhouses(); + if (addon == null) { + addon = new Greenhouses(); + } + return addon; } }