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, @Nullable String version, boolean optional)
Creates a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(@Nullable Object o)
String
getId()
Returns the plugin ID of thisPluginDependency
.Optional<String>
getVersion()
Returns the version thisPluginDependency
should match.int
hashCode()
boolean
isOptional()
Returns whether the dependency is optional for the plugin to work correctly.String
toString()
-
-
-
Method Detail
-
getId
public String getId()
Returns the plugin ID of thisPluginDependency
.- Returns:
- the plugin ID
-
getVersion
public Optional<String> 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
-
-