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>authors()Gets the authors of thePluginwithin this container.default Collection<PluginDependency>dependencies()Gets aCollectionof all dependencies of thePluginwithin this container.default @Nullable Stringdescription()Gets the description of thePluginwithin this container.default @Nullable Pathfile()Returns the file path the plugin was loaded from.default @Nullable PluginDependencygetDependency(String id)Stringid()Gets the qualified ID of thePluginwithin this container.default Stringname()Gets the name of thePluginwithin this container.default @Nullable Stringurl()Gets the url or website of thePluginwithin this container.default Stringversion()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
-
id
String id()
Gets the qualified ID of thePluginwithin this container.- Returns:
- the plugin ID
- See Also:
Plugin.id()
-
name
default String name()
Gets the name of thePluginwithin this container.- Returns:
- a String with the plugin name or the plugin ID
- See Also:
Plugin.name()
-
version
default String version()
Gets the version of thePluginwithin this container.- Returns:
- a String with the plugin version, may be null
- See Also:
Plugin.version()
-
description
default @Nullable String description()
Gets the description of thePluginwithin this container.- Returns:
- a String with the plugin description, may be null
- See Also:
Plugin.description()
-
url
default @Nullable String url()
Gets the url or website of thePluginwithin this container.- Returns:
- an String with the plugin url, may be null
- See Also:
Plugin.url()
-
authors
default List<String> authors()
Gets the authors of thePluginwithin this container.- Returns:
- the plugin authors, may be empty
- See Also:
Plugin.authors()
-
dependencies
default Collection<PluginDependency> dependencies()
Gets aCollectionof all dependencies of thePluginwithin this container.- Returns:
- the plugin dependencies, can be empty
- See Also:
Plugin.dependencies()
-
getDependency
default @Nullable PluginDependency getDependency(String id)
-
file
default @Nullable Path file()
Returns the file path the plugin was loaded from.- Returns:
- the path the plugin was loaded from or
nullif unknown
-
-