Package io.papermc.paper.registry.event
Interface RegistryEventProvider<T,B extends RegistryBuilder<T>>
- Type Parameters:
T- registry entry typeB- registry entry builder type
Provider for registry events for a specific registry.
Supported events are:
RegistryEntryAddEvent(viaentryAdd())RegistryComposeEvent(viacompose())
-
Method Summary
Modifier and TypeMethodDescriptioncompose()Gets the event type forRegistryComposeEventwhich is fired after a registry is loaded of expected elements.entryAdd()Gets the event type forRegistryEntryAddEventwhich is fired just before an object is added to a registry.Gets the registry key associated with this event type provider.
-
Method Details
-
entryAdd
RegistryEntryAddEventType<T,B> entryAdd()Gets the event type forRegistryEntryAddEventwhich is fired just before an object is added to a registry.Can be used in
LifecycleEventManager.registerEventHandler(LifecycleEventType, LifecycleEventHandler)to register a handler forRegistryEntryAddEvent.- Returns:
- the registry entry add event type
-
compose
Gets the event type forRegistryComposeEventwhich is fired after a registry is loaded of expected elements. It allows for the registration of new objects.Can be used in
LifecycleEventManager.registerEventHandler(LifecycleEventType, LifecycleEventHandler)to register a handler forRegistryComposeEvent.- Returns:
- the registry compose event type
-
registryKey
RegistryKey<T> registryKey()Gets the registry key associated with this event type provider.- Returns:
- the registry key
-