Class PluginIdentifier

java.lang.Object
com.hypixel.hytale.common.plugin.PluginIdentifier

public class PluginIdentifier extends Object
Represents an identifier for a plugin, using the plugins group and name

The group represents a unique identifier for a project. (e.g. 'net.hypixel.plugins'), while the name represents the identifier for this specific artifact, which should be unique within the group. (e.g. 'ExamplePlugin')

  • Field Details

  • Constructor Details

    • PluginIdentifier

      public PluginIdentifier(@Nonnull String group, @Nonnull String name)
      Constructor for a PluginIdentifier instance from a given group and name
      Parameters:
      group - Given group that the plugin is associated with
      name - Given name of the plugin
    • PluginIdentifier

      public PluginIdentifier(@Nonnull PluginManifest manifest)
      Constructor for a PluginIdentifier instance from a given manifest
      Parameters:
      manifest - The manifest to read the group and name from
  • Method Details

    • identifyThirdPartyPlugin

      @Nullable public static PluginIdentifier identifyThirdPartyPlugin(Throwable t)
    • getGroup

      @Nonnull public String getGroup()
      Returns:
      the group from this identifier
    • getName

      @Nonnull public String getName()
      Returns:
      the name from this identifier
    • hashCode

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

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

      @Nonnull public String toString()
      Overrides:
      toString in class Object
    • fromString

      @Nonnull public static PluginIdentifier fromString(@Nonnull String str)
      Creates a plugin identifier instance by parsing the provided string
      Parameters:
      str - The string to be parsed
      Returns:
      the parsed string as a PluginIdentifier instance