Interface PluginMeta
- All Known Implementing Classes:
PluginDescriptionFile
This class acts as an abstraction for a plugin configuration.
-
Method Summary
Modifier and TypeMethodDescriptionGets the api version that this plugin supports.Provides the list of authors that are credited with creating this plugin.Provides a list of contributors that contributed to the plugin but are not considered authors.Gives a human-friendly description of the functionality the plugin provides.Returns the display name of the plugin, including the version.Provides a list of plugins that should be loaded before this plugin is loaded.Returns the phase of the server startup logic that the plugin should be loaded.Provides the prefix that should be used for the plugin logger.Provides the fully qualified class name of the main class for the plugin.getName()
Provides the name of the plugin.Provides the default values that apply to the permissions defined in this plugin meta.Provides the list of permissions that are defined via the plugin meta instance.Provides a list of dependencies that are required for this plugin to load.Provides a list of dependencies that are used but not required by this plugin.Returns the list of plugins/dependencies that this plugin provides.Provides the version of this plugin as defined by the plugin.Provides the website for the plugin or the plugin's author.boolean
Returns whether the plugin has been marked to be compatible with regionised threading as provided by Folia
-
Method Details
-
getName
Provides the name of the plugin. This name uniquely identifies the plugin amongst all loaded plugins on the server.- Will only contain alphanumeric characters, underscores, hyphens, and periods: [a-zA-Z0-9_\-\.].
- Typically used for identifying the plugin data folder.
- The name also acts as the token referenced in
getPluginDependencies()
,getPluginSoftDependencies()
, andgetLoadBeforePlugins()
.
In the plugin.yml, this entry is named
name
.Example:
name: MyPlugin
- Returns:
- the name of the plugin
-
getDisplayName
Returns the display name of the plugin, including the version.- Returns:
- a descriptive name of the plugin and respective version
-
getMainClass
Provides the fully qualified class name of the main class for the plugin. A subtype ofJavaPlugin
is expected at this location.- Returns:
- the fully qualified class name of the plugin's main class.
-
getLoadOrder
Returns the phase of the server startup logic that the plugin should be loaded.- Returns:
- the plugin load order
- See Also:
-
getVersion
Provides the version of this plugin as defined by the plugin. There is no inherit format defined/enforced for the version of a plugin, however a common approach might be schematic versioning.- Returns:
- the string representation of the plugin's version
-
getLoggerPrefix
Provides the prefix that should be used for the plugin logger. The logger prefix allows plugins to overwrite the usual default of the logger prefix, which is the name of the plugin.- Returns:
- the specific overwrite of the logger prefix as defined by the plugin. If the plugin did not define a custom logger prefix, this method will return null
-
getPluginDependencies
Provides a list of dependencies that are required for this plugin to load. The list holds the unique identifiers, following the constraints laid out ingetName()
, of the dependencies.If any of the dependencies defined by this list are not installed on the server, this plugin will fail to load.
- Returns:
- an immutable list of required dependency names
-
getPluginSoftDependencies
Provides a list of dependencies that are used but not required by this plugin. The list holds the unique identifiers, following the constraints laid out ingetName()
, of the soft dependencies.If these dependencies are installed on the server, they will be loaded first and supplied as dependencies to this plugin, however the plugin will load even if these dependencies are not installed.
- Returns:
- immutable list of soft dependencies
-
getLoadBeforePlugins
Provides a list of plugins that should be loaded before this plugin is loaded. The list holds the unique identifiers, following the constraints laid out ingetName()
, of the plugins that should be loaded before the plugin described by this plugin meta.The plugins referenced in the list provided by this method are not considered dependencies of this plugin and are hence not available to the plugin at runtime. They merely load before this plugin.
- Returns:
- immutable list of plugins to load before this plugin
-
getProvidedPlugins
Returns the list of plugins/dependencies that this plugin provides. The list holds the unique identifiers, following the constraints laid out ingetName()
, for each plugin it provides the expected classes for.- Returns:
- immutable list of provided plugins/dependencies
-
getAuthors
Provides the list of authors that are credited with creating this plugin. The author names are in no particular format.- Returns:
- an immutable list of the plugin's authors
-
getContributors
Provides a list of contributors that contributed to the plugin but are not considered authors. The names of the contributors are in no particular format.- Returns:
- an immutable list of the plugin's contributors
-
getDescription
Gives a human-friendly description of the functionality the plugin provides.- Returns:
- description or null if the plugin did not define a human readable description.
-
getWebsite
Provides the website for the plugin or the plugin's author. The defined string value is not guaranteed to be in the form of a url.- Returns:
- a string representation of the website that serves as the main hub for this plugin/its author.
-
getPermissions
Provides the list of permissions that are defined via the plugin meta instance.- Returns:
- an immutable list of permissions
-
getPermissionDefault
Provides the default values that apply to the permissions defined in this plugin meta.- Returns:
- the bukkit permission default container.
- See Also:
-
getAPIVersion
Gets the api version that this plugin supports. Nullable if this version is not specified, and should be considered legacy (spigot plugins only)- Returns:
- the version string made up of the major and minor version (e.g. 1.18 or 1.19). Minor versions like 1.18.2 are unified to their major release version (in this example 1.18)
-
isFoliaSupported
boolean isFoliaSupported()Returns whether the plugin has been marked to be compatible with regionised threading as provided by Folia
-