Interface SlimefunAddon
-
- All Known Implementing Classes:
SlimefunPlugin
public interface SlimefunAddon
This is a very basic interface that will be used to identify thePlugin
that registered aSlimefunItem
. It will also contain some utility methods such asgetBugTrackerURL()
to provide some context when bugs arise. It is recommended to implement this interface if you are developing an Addon.- Author:
- TheBusyBiscuit
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description String
getBugTrackerURL()
This method returns a link to the Bug Tracker of thisSlimefunAddon
JavaPlugin
getJavaPlugin()
This method returns the instance ofJavaPlugin
that thisSlimefunAddon
refers to.default Logger
getLogger()
This method returns theLogger
of this addon, it defaults to theLogger
of theJavaPlugin
provided bygetJavaPlugin()
default String
getName()
This method returns the name of this addon, it defaults to the name of theJavaPlugin
provided bygetJavaPlugin()
default String
getPluginVersion()
This method returns the version of this addon, it defaults to the version of theJavaPlugin
provided bygetJavaPlugin()
default boolean
hasDependency(String dependency)
This method checks whether the given String is the name of a dependency of thisSlimefunAddon
.
-
-
-
Method Detail
-
getJavaPlugin
JavaPlugin getJavaPlugin()
This method returns the instance ofJavaPlugin
that thisSlimefunAddon
refers to.- Returns:
- The instance of your
JavaPlugin
-
getBugTrackerURL
String getBugTrackerURL()
This method returns a link to the Bug Tracker of thisSlimefunAddon
- Returns:
- The URL for this Plugin's Bug Tracker, or null
-
getName
default String getName()
This method returns the name of this addon, it defaults to the name of theJavaPlugin
provided bygetJavaPlugin()
- Returns:
- The Name of this
SlimefunAddon
-
getPluginVersion
default String getPluginVersion()
This method returns the version of this addon, it defaults to the version of theJavaPlugin
provided bygetJavaPlugin()
- Returns:
- The version of this
SlimefunAddon
-
getLogger
default Logger getLogger()
This method returns theLogger
of this addon, it defaults to theLogger
of theJavaPlugin
provided bygetJavaPlugin()
- Returns:
- The
Logger
of thisSlimefunAddon
-
hasDependency
default boolean hasDependency(String dependency)
This method checks whether the given String is the name of a dependency of thisSlimefunAddon
. It specifically checks whether the given String can be found inPluginDescriptionFile.getDepend()
orPluginDescriptionFile.getSoftDepend()
- Parameters:
dependency
- The dependency to check for- Returns:
- Whether this
SlimefunAddon
depends on the givenPlugin
-
-