Class PluginDependency
- java.lang.Object
-
- com.velocitypowered.api.plugin.meta.PluginDependency
-
public final class PluginDependency extends Object
Represents a dependency on another plugin.
-
-
Constructor Summary
Constructors Constructor Description PluginDependency(String id, String version, boolean optional)Creates a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(@Nullable Object o)inthashCode()Stringid()Returns the plugin ID of thisPluginDependency.booleanoptional()Returns whether the dependency is optional for the plugin to work correctly.StringtoString()Stringversion()Returns the version thisPluginDependencyshould match in NPM SemVer range format.
-
-
-
Method Detail
-
id
public String id()
Returns the plugin ID of thisPluginDependency.- Returns:
- the plugin ID
-
version
public String version()
Returns the version thisPluginDependencyshould match in NPM SemVer range format.- Returns:
- a String with the plugin version, may be empty if no version requirement is present
-
optional
public boolean optional()
Returns whether the dependency is optional for the plugin to work correctly.- Returns:
- true if dependency is optional
-
-