Package org.geysermc.geyser.api.util
Interface Identifier
@NonExtendable
public interface Identifier
An identifying object for representing unique objects.
This identifier consists of two parts:
- a namespace, which is usually a name identifying your work
- a path, which holds a value.
minecraft:foxgeysermc:one_fun_example
:).- Since:
- 2.9.0
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic IdentifierAttempts to create a new identifier from a string representation.static IdentifierAttempts to create a new identifier from a namespace and path.path()default booleanvanilla()Checks whether this identifier is using the "minecraft" namespace.
-
Field Details
-
DEFAULT_NAMESPACE
The namespace for Minecraft.- Since:
- 2.9.0
- See Also:
-
-
Method Details
-
of
Attempts to create a new identifier from a namespace and path.- Returns:
- the identifier for this namespace and path
- Throws:
IllegalArgumentException- if either namespace or path are invalid.- Since:
- 2.9.0
-
of
Attempts to create a new identifier from a string representation.- Returns:
- the identifier for this namespace and path
- Throws:
IllegalArgumentException- if either the namespace or path are invalid- Since:
- 2.9.0
-
namespace
String namespace()- Returns:
- the namespace of this identifier.
- Since:
- 2.9.0
-
path
String path()- Returns:
- the path of this identifier.
- Since:
- 2.9.0
-
vanilla
default boolean vanilla()Checks whether this identifier is using the "minecraft" namespace.- Since:
- 2.9.0
-