Package io.papermc.paper.registry.event
Interface RegistryFreezeEvent<T,B extends RegistryBuilder<T>>
- Type Parameters:
T
- registry entry typeB
- registry entry builder type
- All Superinterfaces:
LifecycleEvent
,RegistryEvent<T>
@Experimental
@NullMarked
@NonExtendable
public interface RegistryFreezeEvent<T,B extends RegistryBuilder<T>>
extends RegistryEvent<T>
Event object for
RegistryEventProvider.freeze()
. This
event is fired right before a registry is frozen disallowing further changes.
It provides a way for plugins to add new objects to the registry.-
Method Summary
Modifier and TypeMethodDescriptiongetOrCreateTag
(TagKey<V> tagKey) Gets or creates a tag for the given tag key.registry()
Get the writable registry.Methods inherited from interface io.papermc.paper.registry.event.RegistryEvent
registryKey
-
Method Details
-
registry
WritableRegistry<T,B> registry()Get the writable registry.- Returns:
- a writable registry
-
getOrCreateTag
Gets or creates a tag for the given tag key. This tag is then required to be filled either from the built-in or custom datapack.- Type Parameters:
V
- the tag value type- Parameters:
tagKey
- the tag key- Returns:
- the tag
-