Package io.papermc.paper.registry
Interface RegistryAccess
Used for accessing different
Registry instances
by a RegistryKey. Get the main instance of RegistryAccess
with registryAccess().-
Method Summary
Modifier and TypeMethodDescriptiongetRegistry(RegistryKey<T> registryKey) Gets the registry with the specified key.getRegistry(Class<T> type) Deprecated, for removal: This API element is subject to removal in a future version.static RegistryAccessGet theRegistryAccessinstance for the server.
-
Method Details
-
registryAccess
Get theRegistryAccessinstance for the server.- Returns:
- the RegistryAccess instance
-
getRegistry
@Deprecated(since="1.20.6", forRemoval=true) <T extends Keyed> @Nullable Registry<T> getRegistry(Class<T> type) Deprecated, for removal: This API element is subject to removal in a future version.usegetRegistry(RegistryKey)with keys fromRegistryKeyGets the registry based on the type.- Type Parameters:
T- the type- Parameters:
type- the type- Returns:
- the registry or null if none found
-
getRegistry
Gets the registry with the specified key.- Type Parameters:
T- the type- Parameters:
registryKey- the key- Returns:
- the registry
- Throws:
NoSuchElementException- if no registry with the key is foundIllegalArgumentException- if the registry is not available yet
-
getRegistry(RegistryKey)with keys fromRegistryKey