Class PluginDependency

java.lang.Object
eu.hexagonmc.spigot.annotation.meta.PluginDependency

public class PluginDependency extends Object
Represents a plugin dependency.

The name specifies the plugin to depend on.

The type specifies the if the dependency is required, optionally or should be loaded after the current plugin.
See Also:
  • Constructor Details

    • PluginDependency

      public PluginDependency(String name)
      Creates a new dependency from a plugin name.
      Parameters:
      name - The name of the plugin to depend on
  • Method Details

    • from

      public static PluginDependency from(Dependency annotation)
      Creates dependency from an annotation. Parses the data stored in the annotation.
      Parameters:
      annotation - The annotation to parse for data
      Returns:
      The new dependency
      See Also:
    • getName

      public String getName()
      The name of this dependency.
      Returns:
      The name
    • setName

      public void setName(String name)
      Sets the name of this dependency.
      Parameters:
      name - The name to set
    • getType

      public DependencyType getType()
      The type of this dependency.
      Returns:
      The type
      See Also:
    • setType

      public void setType(DependencyType type)
      Sets the type of this dependency.
      Parameters:
      type - The type to set
    • toString

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

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

      public boolean equals(Object obj)
      Overrides:
      equals in class Object