- All Implemented Interfaces:
LifecycleObject
Represents an addon that can be loaded, enabled, and disabled within the plugin system.
Addons are modular components packaged as separate JAR files, allowing external
functionality to be integrated into the plugin. Unlike extensions, which are built
into the plugin, addons are managed dynamically by loading and unloading external
resources at runtime.
-
Nested Class Summary
Nested Classes
-
Constructor Summary
Constructors
-
Method Summary
File
Gets the data folder for this addon, where it can store its configuration files.
String
Gets the name of this addon.
abstract String
Gets the required plugin version for this addon to function properly.
InputStream
Retrieves a resource file inside the addon's JAR.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Details
-
getRequiredPluginVersion
public abstract String getRequiredPluginVersion()
Gets the required plugin version for this addon to function properly.
- Returns:
- the required version as a string.
-
getDataFolder
public File getDataFolder()
Gets the data folder for this addon, where it can store its configuration files.
- Returns:
- the data folder as a File.
-
getName
public String getName()
Gets the name of this addon.
- Returns:
- the name of the addon.
-
getResource
public InputStream getResource(String filename)
Retrieves a resource file inside the addon's JAR.
- Parameters:
-
filename - the name of the resource file.
- Returns:
- an InputStream of the resource, or null if not found.