Class PluginDependency
java.lang.Object
com.velocitypowered.api.plugin.meta.PluginDependency
Represents a dependency on another plugin.
-
Constructor Summary
ConstructorDescriptionPluginDependency
(String id, @Nullable String version, boolean optional) Creates a new instance. -
Method Summary
Modifier and TypeMethodDescriptionboolean
getId()
Returns the plugin ID of thisPluginDependency
.Returns the version thisPluginDependency
should match.int
hashCode()
boolean
Returns 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 thisPluginDependency
should match.- Returns:
- an
Optional
with 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
-