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 booleanequals(@Nullable Object o)StringgetId()Returns the plugin ID of thisPluginDependency.Optional<String>getVersion()Returns the version thisPluginDependencyshould match.inthashCode()booleanisOptional()Returns whether the dependency is optional for the plugin to work correctly.StringtoString()
-
-
-
Method Detail
-
getId
public String getId()
Returns the plugin ID of thisPluginDependency.- Returns:
- the plugin ID
-
getVersion
public Optional<String> 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
-
-