Package ovh.mythmc.social.api
Class SocialRegistries.Channels
java.lang.Object
ovh.mythmc.social.api.util.registry.AbstractRegistry<IdentifiedRegistryKey,ChatChannel>
ovh.mythmc.social.api.util.registry.AbstractRegistry.Identified<ChatChannel>
ovh.mythmc.social.api.SocialRegistries.Channels
- All Implemented Interfaces:
Iterable<ChatChannel>,Registry<IdentifiedRegistryKey,ChatChannel>
- Enclosing class:
SocialRegistries
public static final class SocialRegistries.Channels
extends AbstractRegistry.Identified<ChatChannel>
A specialised registry for
ChatChannel objects that fires lifecycle
callbacks on registration and unregistration.-
Nested Class Summary
Nested classes/interfaces inherited from class ovh.mythmc.social.api.util.registry.AbstractRegistry
AbstractRegistry.Identified<T>, AbstractRegistry.Namespaced<T> -
Method Summary
Modifier and TypeMethodDescriptionvoidregister(@NotNull IdentifiedRegistryKey registryKey, @NotNull ChatChannel value) Registers a value to the registry, associating it with the given registry key.unregister(@NotNull IdentifiedRegistryKey registryKey) Unregisters a value from the registry, removing it associated with the given registry key.Methods inherited from class ovh.mythmc.social.api.util.registry.AbstractRegistry.Identified
registryMethods inherited from class ovh.mythmc.social.api.util.registry.AbstractRegistry
containsKey, containsValue, iterator, keys, value, values, valuesByTypeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Method Details
-
register
public void register(@NotNull @NotNull IdentifiedRegistryKey registryKey, @NotNull @NotNull ChatChannel value) Description copied from interface:RegistryRegisters a value to the registry, associating it with the given registry key.- Specified by:
registerin interfaceRegistry<IdentifiedRegistryKey,ChatChannel> - Overrides:
registerin classAbstractRegistry<IdentifiedRegistryKey,ChatChannel> - Parameters:
registryKey- the key to associate with the value.value- the value to register.
-
unregister
@Nullable public @Nullable ChatChannel unregister(@NotNull @NotNull IdentifiedRegistryKey registryKey) Description copied from interface:RegistryUnregisters a value from the registry, removing it associated with the given registry key.- Specified by:
unregisterin interfaceRegistry<IdentifiedRegistryKey,ChatChannel> - Overrides:
unregisterin classAbstractRegistry<IdentifiedRegistryKey,ChatChannel> - Parameters:
registryKey- the key whose associated value should be removed.- Returns:
- the removed value, or
nullif no value was associated with the key.
-