Package io.papermc.paper.registry
Interface Reference<T extends Keyed>
- Type Parameters:
- T- type of the value
- All Superinterfaces:
- net.kyori.adventure.key.Keyed,- Keyed
Represents a reference to a server-backed registry value that may
 change.
- 
Method Details- 
valueGets the value from the registry with the key.- Returns:
- the value
- Throws:
- NoSuchElementException- if there is no value with this key
 
- 
valueOrNullGets the value from the registry with the key.- Returns:
- the value or null if it doesn't exist
 
- 
create@NotNull static <T extends Keyed> @NotNull Reference<T> create(@NotNull @NotNull Registry<T> registry, @NotNull @NotNull NamespacedKey key) Creates a reference to a registered value.- Type Parameters:
- T- the type of the value
- Parameters:
- registry- the registry the value is located in
- key- the key to the value
- Returns:
- a reference
 
 
-