Class NamespacedTag

java.lang.Object
com.destroystokyo.paper.NamespacedTag
All Implemented Interfaces:
Namespaced

@Deprecated(forRemoval=true, since="1.20.6") public final class NamespacedTag extends Object implements Namespaced
Deprecated, for removal: This API element is subject to removal in a future version.
Represents a String based key pertaining to a tagged entry. Consists of two components - a namespace and a key.

Namespaces may only contain lowercase alphanumeric characters, periods, underscores, and hyphens.

Keys may only contain lowercase alphanumeric characters, periods, underscores, hyphens, and forward slashes.

  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    Deprecated, for removal: This API element is subject to removal in a future version.
    The namespace representing all keys generated by Bukkit for backwards compatibility measures.
    static final String
    Deprecated, for removal: This API element is subject to removal in a future version.
    The namespace representing all inbuilt keys.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Deprecated.
    should never be used by plugins, for internal use only!!
    Deprecated, for removal: This API element is subject to removal in a future version.
    Create a key in the plugin's namespace.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    Deprecated, for removal: This API element is subject to removal in a future version.
    Gets the key corresponding to this resource
    Deprecated, for removal: This API element is subject to removal in a future version.
    Gets the namespace this resource is a part of
    int
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    Deprecated, for removal: This API element is subject to removal in a future version.
    Get a key in the Minecraft namespace.
    Deprecated.
    should never be used by plugins, for internal use only!!
    Deprecated, for removal: This API element is subject to removal in a future version.
     

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

    • MINECRAFT

      public static final String MINECRAFT
      Deprecated, for removal: This API element is subject to removal in a future version.
      The namespace representing all inbuilt keys.
      See Also:
    • BUKKIT

      public static final String BUKKIT
      Deprecated, for removal: This API element is subject to removal in a future version.
      The namespace representing all keys generated by Bukkit for backwards compatibility measures.
      See Also:
  • Constructor Details

    • NamespacedTag

      @Deprecated public NamespacedTag(@NotNull @NotNull String namespace, @NotNull @NotNull String key)
      Deprecated.
      should never be used by plugins, for internal use only!!
      Create a key in a specific namespace.
      Parameters:
      namespace - String representing a grouping of keys
      key - Name for this specific key
    • NamespacedTag

      public NamespacedTag(@NotNull @NotNull Plugin plugin, @NotNull @NotNull String key)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Create a key in the plugin's namespace.

      Namespaces may only contain lowercase alphanumeric characters, periods, underscores, and hyphens.

      Keys may only contain lowercase alphanumeric characters, periods, underscores, hyphens, and forward slashes.

      Parameters:
      plugin - the plugin to use for the namespace
      key - the key to create
  • Method Details

    • getNamespace

      @NotNull public @NotNull String getNamespace()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Description copied from interface: Namespaced
      Gets the namespace this resource is a part of

      This is contractually obligated to only contain lowercase alphanumeric characters, periods, underscores, and hyphens.

      Specified by:
      getNamespace in interface Namespaced
      Returns:
      resource namespace
    • getKey

      @NotNull public @NotNull String getKey()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Description copied from interface: Namespaced
      Gets the key corresponding to this resource

      This is contractually obligated to only contain lowercase alphanumeric characters, periods, underscores, hyphens, and forward slashes.

      Specified by:
      getKey in interface Namespaced
      Returns:
      resource key
    • hashCode

      public int hashCode()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Overrides:
      toString in class Object
    • randomKey

      @Deprecated public static NamespacedTag randomKey()
      Deprecated.
      should never be used by plugins, for internal use only!!
      Return a new random key in the BUKKIT namespace.
      Returns:
      new key
    • minecraft

      @NotNull public static @NotNull NamespacedTag minecraft(@NotNull @NotNull String key)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Get a key in the Minecraft namespace.
      Parameters:
      key - the key to use
      Returns:
      new key in the Minecraft namespace