Package xyz.gmitch215.socketmc.util
Class Identifier
java.lang.Object
xyz.gmitch215.socketmc.util.Identifier
- All Implemented Interfaces:
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 Summary
ConstructorsConstructorDescriptionIdentifier(@NotNull String namespace, @NotNull String path) Creates a new Identifier. -
Method Summary
Modifier and TypeMethodDescriptionbooleanGets the namespace of the Identifier.getPath()Gets the path of the Identifier.inthashCode()static @NotNull IdentifierCreates a new Identifier with the namespace "minecraft".static @NotNull Identifierrandom()Creates a new random Identifier with the namespace "socketmc" and a random UUID as its path.static @NotNull IdentifierCreates a new Identifier with the namespace "socketmc".toString()
-
Constructor Details
-
Identifier
Creates a new Identifier.- Parameters:
namespace- The namespace of the Identifier.path- The path of the Identifier.
-
-
Method Details
-
getNamespace
Gets the namespace of the Identifier.- Returns:
- The namespace of the Identifier.
-
getPath
Gets the path of the Identifier.- Returns:
- The path of the Identifier.
-
equals
-
hashCode
public int hashCode() -
toString
-
minecraft
Creates a new Identifier with the namespace "minecraft".- Parameters:
path- The path of the Identifier.- Returns:
- The new Identifier.
-
socketmc
Creates a new Identifier with the namespace "socketmc".- Parameters:
path- The path of the Identifier.- Returns:
- The new Identifier.
-
random
Creates a new random Identifier with the namespace "socketmc" and a random UUID as its path.- Returns:
- The new random Identifier.
-