Class PluginDependency
java.lang.Object
com.velocitypowered.api.plugin.meta.PluginDependency
Represents a dependency on another plugin.
-
Constructor Summary
ConstructorsConstructorDescriptionPluginDependency(String id, @Nullable String version, boolean optional) Creates a new instance. -
Method Summary
Modifier and TypeMethodDescriptionbooleangetId()Returns the plugin ID of thisPluginDependency.Returns the version thisPluginDependencyshould match.inthashCode()booleanReturns whether the dependency is optional for the plugin to work correctly.toString()
-
Constructor Details
-
PluginDependency
Creates a new instance.- Parameters:
id- the plugin IDversion- an optional versionoptional- whether or not this dependency is optional
-
-
Method Details
-
getId
Returns the plugin ID of thisPluginDependency.- Returns:
- the plugin ID
-
getVersion
Returns the version thisPluginDependencyshould match.- Returns:
- an
Optionalwith the plugin version, may be empty
-
isOptional
public boolean isOptional()Returns whether the dependency is optional for the plugin to work correctly.- Returns:
- true if dependency is optional
-
equals
-
hashCode
public int hashCode() -
toString
-