Interface ValidationContext


@NonExtendable public interface ValidationContext
Handed to a Validator.
  • Method Summary

    Modifier and Type
    Method
    Description
    default <T extends net.kyori.adventure.key.Keyed>
    @NotNull Optional<AddonId>
    owner(@NotNull RegistryType<T> type, @NotNull net.kyori.adventure.key.Key id)
     
    The registries being validated (staged content at startup, the new snapshot on reload).
    void
    report(@NotNull Diagnostic diagnostic)
    Reports a finding.
  • Method Details

    • registries

      @NotNull @NotNull RegistryAccess registries()
      The registries being validated (staged content at startup, the new snapshot on reload).
    • report

      void report(@NotNull @NotNull Diagnostic diagnostic)
      Reports a finding. If it has no source, it is attributed to the addon owning its subject, or else to the validator's own addon.
    • owner

      @NotNull default <T extends net.kyori.adventure.key.Keyed> @NotNull Optional<AddonId> owner(@NotNull @NotNull RegistryType<T> type, @NotNull @NotNull net.kyori.adventure.key.Key id)
      Returns:
      the owner of an entry, for attribution