From 7441b7717f08238588c86bbc62b6778191aee4b2 Mon Sep 17 00:00:00 2001 From: tastybento Date: Tue, 2 Jul 2024 09:31:01 -0700 Subject: [PATCH] return the pladdon that was generated. --- .../java/world/bentobox/challenges/ChallengesPladdon.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main/java/world/bentobox/challenges/ChallengesPladdon.java b/src/main/java/world/bentobox/challenges/ChallengesPladdon.java index 5fa2ef1..d8e8a94 100644 --- a/src/main/java/world/bentobox/challenges/ChallengesPladdon.java +++ b/src/main/java/world/bentobox/challenges/ChallengesPladdon.java @@ -15,9 +15,13 @@ import world.bentobox.bentobox.api.addons.Pladdon; */ public class ChallengesPladdon extends Pladdon { + private Addon addon; @Override public Addon getAddon() { - return new ChallengesAddon(); + if (addon == null) { + addon = new ChallengesAddon(); + } + return addon; } }