Package org.empirewar.orbis.registry
Class ResolvableStringOrbisRegistry<T extends RegistryResolvable<String>>
java.lang.Object
org.empirewar.orbis.registry.SimpleOrbisRegistry<T,String>
org.empirewar.orbis.registry.StringOrbisRegistry<T>
org.empirewar.orbis.registry.ResolvableStringOrbisRegistry<T>
- All Implemented Interfaces:
Iterable<T>,net.kyori.adventure.key.Keyed,OrbisRegistry<T,,String> ResolvableRegistry<T,String>
public class ResolvableStringOrbisRegistry<T extends RegistryResolvable<String>>
extends StringOrbisRegistry<T>
implements ResolvableRegistry<T,String>
-
Field Summary
Fields inherited from class org.empirewar.orbis.registry.SimpleOrbisRegistry
entries, lifecycle, registryKey -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidresolve(String key, Consumer<T> consumer, RegistryLifecycle waitFor) Resolves a single entry in this registry.voidsetLifecycle(RegistryLifecycle lifecycle) Methods inherited from class org.empirewar.orbis.registry.StringOrbisRegistry
getCodecMethods inherited from class org.empirewar.orbis.registry.SimpleOrbisRegistry
get, getAll, getKeys, getLifecycle, iterator, key, toString, unregisterMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, iterator, spliteratorMethods inherited from interface net.kyori.adventure.key.Keyed
keyMethods inherited from interface org.empirewar.orbis.registry.OrbisRegistry
get, getAll, getCodec, getKeys, getLifecycle, unregisterMethods inherited from interface org.empirewar.orbis.registry.ResolvableRegistry
resolve
-
Constructor Details
-
ResolvableStringOrbisRegistry
public ResolvableStringOrbisRegistry(net.kyori.adventure.key.Key key)
-
-
Method Details
-
register
- Specified by:
registerin interfaceOrbisRegistry<T extends RegistryResolvable<String>,String> - Overrides:
registerin classSimpleOrbisRegistry<T extends RegistryResolvable<String>,String>
-
getKey
- Specified by:
getKeyin interfaceOrbisRegistry<T extends RegistryResolvable<String>,String> - Overrides:
getKeyin classSimpleOrbisRegistry<T extends RegistryResolvable<String>,String>
-
resolve
Description copied from interface:ResolvableRegistryResolves a single entry in this registry.If the entry is already present in the registry, it will be passed to the consumer immediately. If the entry is not present, and the registry is not frozen, the consumer will be registered with the registry's resolver list, and will be passed the entry when it is registered.
If the registry has already passed the specified lifecycle, this method will throw an
IllegalStateException.- Specified by:
resolvein interfaceResolvableRegistry<T extends RegistryResolvable<String>,String> - Parameters:
key- the key of the entry to resolveconsumer- the consumer to accept the entrywaitFor- the lifecycle to wait in for which the entry is valid
-
setLifecycle
- Specified by:
setLifecyclein interfaceOrbisRegistry<T extends RegistryResolvable<String>,String> - Overrides:
setLifecyclein classSimpleOrbisRegistry<T extends RegistryResolvable<String>,String>
-