Interface SlimefunAddon
- All Known Implementing Classes:
Slimefun
public interface SlimefunAddon
This is a very basic interface that will be used to identify
the
Plugin
that registered a SlimefunItem
.
It will also contain some utility methods such as getBugTrackerURL()
to provide some context when bugs arise.
It is recommended to implement this interface if you are developing
an Addon.- Author:
- TheBusyBiscuit
-
Method Summary
Modifier and TypeMethodDescriptionThis method returns a link to the Bug Tracker of thisSlimefunAddon
This method returns the instance ofJavaPlugin
that thisSlimefunAddon
refers to.default Logger
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
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 Details
-
getJavaPlugin
This method returns the instance ofJavaPlugin
that thisSlimefunAddon
refers to.- Returns:
- The instance of your
JavaPlugin
-
getBugTrackerURL
This method returns a link to the Bug Tracker of thisSlimefunAddon
- Returns:
- The URL for this Plugin's Bug Tracker, or null
-
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
This method returns the version of this addon, it defaults to the version of theJavaPlugin
provided bygetJavaPlugin()
- Returns:
- The version of this
SlimefunAddon
-
getLogger
This method returns theLogger
of this addon, it defaults to theLogger
of theJavaPlugin
provided bygetJavaPlugin()
- Returns:
- The
Logger
of thisSlimefunAddon
-
hasDependency
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
-