Package com.velocitypowered.api.plugin
Interface PluginDescription
-
public interface PluginDescriptionRepresents metadata for a specific version of a plugin.
-
-
Field Summary
Fields Modifier and Type Field Description static PatternID_PATTERNThe pattern plugin IDs must match.
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default List<String>getAuthors()Gets the authors of thePluginwithin this container.default Collection<PluginDependency>getDependencies()Gets aCollectionof all dependencies of thePluginwithin this container.default Optional<PluginDependency>getDependency(String id)default Optional<String>getDescription()Gets the description of thePluginwithin this container.StringgetId()Gets the qualified ID of thePluginwithin this container.default Optional<String>getName()Gets the name of thePluginwithin this container.default Optional<Path>getSource()Returns the source the plugin was loaded from.default Optional<String>getUrl()Gets the url or website of thePluginwithin this container.default Optional<String>getVersion()Gets the version of thePluginwithin this container.
-
-
-
Field Detail
-
ID_PATTERN
static final Pattern ID_PATTERN
The pattern plugin IDs must match. Plugin IDs may only contain alphanumeric characters, dashes or underscores, must start with an alphabetic character and cannot be longer than 64 characters.
-
-
Method Detail
-
getId
String getId()
Gets the qualified ID of thePluginwithin this container.- Returns:
- the plugin ID
- See Also:
Plugin.id()
-
getName
default Optional<String> getName()
Gets the name of thePluginwithin this container.- Returns:
- an
Optionalwith the plugin name, may be empty - See Also:
Plugin.name()
-
getVersion
default Optional<String> getVersion()
Gets the version of thePluginwithin this container.- Returns:
- an
Optionalwith the plugin version, may be empty - See Also:
Plugin.version()
-
getDescription
default Optional<String> getDescription()
Gets the description of thePluginwithin this container.- Returns:
- an
Optionalwith the plugin description, may be empty - See Also:
Plugin.description()
-
getUrl
default Optional<String> getUrl()
Gets the url or website of thePluginwithin this container.- Returns:
- an
Optionalwith the plugin url, may be empty - See Also:
Plugin.url()
-
getAuthors
default List<String> getAuthors()
Gets the authors of thePluginwithin this container.- Returns:
- the plugin authors, may be empty
- See Also:
Plugin.authors()
-
getDependencies
default Collection<PluginDependency> getDependencies()
Gets aCollectionof all dependencies of thePluginwithin this container.- Returns:
- the plugin dependencies, can be empty
- See Also:
Plugin.dependencies()
-
getDependency
default Optional<PluginDependency> getDependency(String id)
-
getSource
default Optional<Path> getSource()
Returns the source the plugin was loaded from.- Returns:
- the source the plugin was loaded from or
Optional.empty()if unknown
-
-