From c3b25c92b573e0ab88aa57c08913acf861f9916f Mon Sep 17 00:00:00 2001 From: tastybento Date: Mon, 31 May 2021 16:01:12 -0700 Subject: [PATCH] Added JavaDoc --- .../java/world/bentobox/bentobox/api/addons/Pladdon.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/main/java/world/bentobox/bentobox/api/addons/Pladdon.java b/src/main/java/world/bentobox/bentobox/api/addons/Pladdon.java index 1b712757d..0fdf15220 100644 --- a/src/main/java/world/bentobox/bentobox/api/addons/Pladdon.java +++ b/src/main/java/world/bentobox/bentobox/api/addons/Pladdon.java @@ -8,6 +8,8 @@ import org.bukkit.plugin.java.JavaPlugin; import com.google.common.io.Files; /** + * Provides a shell for addons to become Plugins so that other Plugins + * can tap into their API more easily. Plugin + addon = Pladdon * @author tastybento * */ @@ -15,6 +17,10 @@ public abstract class Pladdon extends JavaPlugin { private static final String ADDONS_FOLDER = "BentoBox/addons"; + /** + * This must return a new instance of the addon. It is called when the Pladdon is loaded. + * @return new instance of the addon + */ public abstract Addon getAddon(); @Override @@ -26,7 +32,7 @@ public abstract class Pladdon extends JavaPlugin { } } - public void moveJar() { + protected void moveJar() { getLogger().severe(getFile().getName() + " must be in the BentoBox/addons folder! Trying to move it there..."); File addons = new File(getFile().getParent(), ADDONS_FOLDER); if (addons.exists() || addons.mkdirs()) {