Package net.ess3.api

Class PluginKey

java.lang.Object
net.ess3.api.PluginKey

public final class PluginKey extends Object
A namespaced key that uses plugins as namespaces.
  • Method Details

    • random

      public static PluginKey random(Plugin plugin)
      Create a randomly-generated plugin key under the given plugin's namespace.

      Note: Plugins should prefer to create keys with predictable names - see fromKey(Plugin, String).

      Parameters:
      plugin - The plugin whose namespace to use
      Returns:
      A random key under the given plugin's namespace
    • fromKey

      public static PluginKey fromKey(Plugin plugin, String key)
      Create a plugin key under the given plugin's namespace with the given name.
      Parameters:
      plugin - The plugin whose namespace to use
      key - The name of the key to create
      Returns:
      The key under the given plugin's namespace.
    • getPlugin

      public Plugin getPlugin()
    • getKey

      public String getKey()
    • hashCode

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

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

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