Package io.papermc.paper.registry
Interface TypedKey<T>
- Type Parameters:
- T- the value type for the registry
- All Superinterfaces:
- Comparable<Key>,- net.kyori.examination.Examinable,- Key,- Keyed,- Namespaced
Represents a key for a value in a specific registry.
- 
Field SummaryFields inherited from interface net.kyori.adventure.key.KeyDEFAULT_SEPARATOR, MINECRAFT_NAMESPACE
- 
Method SummaryModifier and TypeMethodDescriptionstatic <T> TypedKey<T> create(RegistryKey<T> registryKey, String key) Create a typed key from a string and a registry key.static <T> TypedKey<T> create(RegistryKey<T> registryKey, Key key) Create a typed key from a key and a registry key.key()Gets the key for the value in the registry.Gets the registry key for the value this key represents.Methods inherited from interface net.kyori.examination.ExaminableexaminableName, examineMethods inherited from interface net.kyori.adventure.key.KeyasMinimalString, asString, compareTo, examinableProperties, namespace, value
- 
Method Details- 
keyKey key()Gets the key for the value in the registry.
- 
registryKeyRegistryKey<T> registryKey()Gets the registry key for the value this key represents.- Returns:
- the registry key
 
- 
createCreate a typed key from a key and a registry key.- Type Parameters:
- T- value type
- Parameters:
- registryKey- the registry this key is for
- key- the key for the value in the registry
- Returns:
- a new key for the value key and registry key
 
- 
createCreate a typed key from a string and a registry key.- Type Parameters:
- T- value type
- Parameters:
- registryKey- the registry this key is for
- key- the string version of a- Keythat will be passed to- Key.key(String)for parsing.
- Returns:
- a new key for the value key and registry key
- See Also:
 
 
-