Interface DataSectionRegistry


public interface DataSectionRegistry
Registry of custom DataSections. Thread-safe.
  • Method Details

    • register

      void register(@NotNull @NotNull DataSection<?> section)
      Throws:
      IllegalArgumentException - if the id is invalid or already registered
    • unregister

      boolean unregister(@NotNull @NotNull String id)
      Returns:
      true when a section with that id was removed
    • get

      @Nullable @Nullable DataSection<?> get(@NotNull @NotNull String id)
    • all

      @NotNull @NotNull Collection<DataSection<?>> all()
      Returns:
      snapshot of the registered sections, in registration order