Package com.velocitypowered.api.plugin
Interface PluginDescription
-
public interface PluginDescription
Represents metadata for a specific version of a plugin.
-
-
Field Summary
Fields Modifier and Type Field Description static Pattern
ID_PATTERN
The 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 thePlugin
within this container.default Collection<PluginDependency>
getDependencies()
Gets aCollection
of all dependencies of thePlugin
within this container.default Optional<PluginDependency>
getDependency(String id)
default Optional<String>
getDescription()
Gets the description of thePlugin
within this container.String
getId()
Gets the qualified ID of thePlugin
within this container.default Optional<String>
getName()
Gets the name of thePlugin
within this container.default Optional<Path>
getSource()
Returns the source the plugin was loaded from.default Optional<String>
getUrl()
Gets the url or website of thePlugin
within this container.default Optional<String>
getVersion()
Gets the version of thePlugin
within 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 thePlugin
within this container.- Returns:
- the plugin ID
- See Also:
Plugin.id()
-
getName
default Optional<String> getName()
Gets the name of thePlugin
within this container.- Returns:
- an
Optional
with the plugin name, may be empty - See Also:
Plugin.name()
-
getVersion
default Optional<String> getVersion()
Gets the version of thePlugin
within this container.- Returns:
- an
Optional
with the plugin version, may be empty - See Also:
Plugin.version()
-
getDescription
default Optional<String> getDescription()
Gets the description of thePlugin
within this container.- Returns:
- an
Optional
with the plugin description, may be empty - See Also:
Plugin.description()
-
getUrl
default Optional<String> getUrl()
Gets the url or website of thePlugin
within this container.- Returns:
- an
Optional
with the plugin url, may be empty - See Also:
Plugin.url()
-
getAuthors
default List<String> getAuthors()
Gets the authors of thePlugin
within this container.- Returns:
- the plugin authors, may be empty
- See Also:
Plugin.authors()
-
getDependencies
default Collection<PluginDependency> getDependencies()
Gets aCollection
of all dependencies of thePlugin
within 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
-
-