Interface ReloadContext<T extends net.kyori.adventure.key.Keyed>


@NonExtendable public interface ReloadContext<T extends net.kyori.adventure.key.Keyed>
Handed to a ReloadableProvider while a snapshot is being built.
  • Method Summary

    Modifier and Type
    Method
    Description
    @NotNull AddonId
     
    <V extends T>
    V
    register(V value)
     
    Static registries (frozen) and the reloadable registries' current snapshots.
    void
    report(@NotNull Diagnostic diagnostic)
    Adds a finding to the reload report.
  • Method Details

    • addon

      @NotNull @NotNull AddonId addon()
    • registries

      @NotNull @NotNull RegistryAccess registries()
      Static registries (frozen) and the reloadable registries' current snapshots.
    • register

      @NotNull <V extends T> V register(@NotNull V value)
      Throws:
      RegistrationException - if the key is already used in this snapshot
    • report

      void report(@NotNull @NotNull Diagnostic diagnostic)
      Adds a finding to the reload report. Errors reject the whole reload (ยง7.3); use warnings for entries that are skipped while the rest loads.