Class Identifier

java.lang.Object
xyz.gmitch215.socketmc.util.Identifier
All Implemented Interfaces:
Serializable

public final class Identifier extends Object implements Serializable

Represents a Namespaced Identifier.

Identifiers are often used to locate files on the client, used for displaying information. For example:

new Identifier("textures/gui/title/realms.png")

This Identifier links to "textures/gui/title/realms.png", which is the Realms Logo.

See Also:
  • Constructor Details

  • Method Details

    • getNamespace

      public String getNamespace()
      Gets the namespace of the Identifier.
      Returns:
      The namespace of the Identifier.
    • getPath

      public String getPath()
      Gets the path of the Identifier.
      Returns:
      The path of the Identifier.
    • equals

      public boolean equals(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
    • minecraft

      @NotNull public static @NotNull Identifier minecraft(@NotNull @NotNull String path)
      Creates a new Identifier with the namespace "minecraft".
      Parameters:
      path - The path of the Identifier.
      Returns:
      The new Identifier.