Interface ResolvableRegistry<T extends RegistryResolvable<K>,K>

All Superinterfaces:
Iterable<T>, net.kyori.adventure.key.Keyed, OrbisRegistry<T,K>
All Known Implementing Classes:
ResolvableStringOrbisRegistry

public non-sealed interface ResolvableRegistry<T extends RegistryResolvable<K>,K> extends OrbisRegistry<T,K>
  • Method Details

    • resolve

      void resolve(K key, Consumer<T> entry, RegistryLifecycle waitFor)
      Resolves 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.

      Parameters:
      key - the key of the entry to resolve
      entry - the consumer to accept the entry
      waitFor - the lifecycle to wait in for which the entry is valid
    • resolve

      default void resolve(K key, Consumer<T> entry)
      A convenience overload of resolve(Object, Consumer, RegistryLifecycle) which uses the registry's current lifecycle.
      Parameters:
      key - the key of the entry to resolve
      entry - the consumer to accept the entry