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 thisSlimefunAddonThis method returns the instance ofJavaPluginthat thisSlimefunAddonrefers to.default LoggerThis method returns theLoggerof this addon, it defaults to theLoggerof theJavaPluginprovided bygetJavaPlugin()default StringgetName()This method returns the name of this addon, it defaults to the name of theJavaPluginprovided bygetJavaPlugin()default StringThis method returns the version of this addon, it defaults to the version of theJavaPluginprovided bygetJavaPlugin()default booleanhasDependency(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 ofJavaPluginthat thisSlimefunAddonrefers 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 theJavaPluginprovided bygetJavaPlugin()- Returns:
- The Name of this
SlimefunAddon
-
getPluginVersion
This method returns the version of this addon, it defaults to the version of theJavaPluginprovided bygetJavaPlugin()- Returns:
- The version of this
SlimefunAddon
-
getLogger
This method returns theLoggerof this addon, it defaults to theLoggerof theJavaPluginprovided bygetJavaPlugin()- Returns:
- The
Loggerof 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
SlimefunAddondepends on the givenPlugin
-