Package io.papermc.paper.registry
Interface TypedKey<T>
- Type Parameters:
T
- the value type for the registry
- All Superinterfaces:
Keyed
Represents a key for a value in a specific registry.
-
Method Details
-
key
Gets the key for the value in the registry. -
registryKey
Gets the registry key for the value this key represents.- Returns:
- the registry key
-
create
@Experimental @NotNull static <T> @NotNull TypedKey<T> create(@NotNull @NotNull RegistryKey<T> registryKey, @NotNull @NotNull Key key) Create a typed key from a key and a registry key.- Type Parameters:
T
- value type- Parameters:
registryKey
- the registry this key is forkey
- the key for the value in the registry- Returns:
- a new key for the value key and registry key
-