Contents
Class Registry<T extends Registration>
java.lang.Object
com.hypixel.hytale.registry.Registry<T>
- Type Parameters:
T- the type of registration.
- Direct Known Subclasses:
ClientFeatureRegistry, CommandRegistry, EntityRegistry, EventRegistry, TaskRegistry
A registry containing
Registration's-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceA function to wrap registrations. -
Method Summary
Modifier and TypeMethodDescriptionvoidenable()Called to enable this registry.booleanRegister a registration with this registry.voidshutdown()Called to shut down this registry and unregister allRegistration'svoidshutdownAndCleanup(boolean shutdown) Shuts down this registry and unregisters all registrations in reverse order.toString()
-
Method Details
-
isEnabled
public boolean isEnabled()- Returns:
trueif this registry is enabled,falseotherwise.
-
enable
public void enable()Called to enable this registry. -
shutdown
public void shutdown()Called to shut down this registry and unregister allRegistration's -
shutdownAndCleanup
public void shutdownAndCleanup(boolean shutdown) Shuts down this registry and unregisters all registrations in reverse order.Unlike
shutdown(), which only disables the registry, this method also executes and clears all registration cleanup tasks. Use this for registries that own their registrations list rather than sharing it with other registries.- Parameters:
shutdown- whether the registry is being shut down or just disabled
-
register
-
getRegistrations
- Returns:
- the unmodifiable list of registrations in this registry.
-
toString
-