Class PluginDependency

java.lang.Object
com.velocitypowered.api.plugin.meta.PluginDependency

public final class PluginDependency extends Object
Represents a dependency on another plugin.
  • Constructor Details

    • PluginDependency

      public PluginDependency(String id, @Nullable String version, boolean optional)
      Creates a new instance.
      Parameters:
      id - the plugin ID
      version - an optional version
      optional - whether or not this dependency is optional
  • Method Details

    • getId

      public String getId()
      Returns the plugin ID of this PluginDependency.
      Returns:
      the plugin ID
    • getVersion

      public Optional<String> getVersion()
      Returns the version this PluginDependency 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

      public boolean equals(@Nullable Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object