Interface ConfigAPI

All Known Implementing Classes:
BukkitConfigAPI, VelocityConfigAPI

public interface ConfigAPI
The core API interface for managing configurations and event handling. Provides access to the event system and the central configuration registry.
Since:
0.1
Author:
a8kj7sea
  • Method Summary

    Modifier and Type
    Method
    Description
    default void
    callEvent(me.a8kj.eventbus.Event event)
    Calls an event and dispatches it to all registered listeners.
    default ConfigFile<?>
    Retrieves a specific configuration file from the registry using its unique key.
    Retrieves the central registry where all configuration files are stored.
    me.a8kj.eventbus.manager.EventManager
    Retrieves the event manager responsible for handling library-specific events.
    default void
    registerListener(me.a8kj.eventbus.Listener listener)
    Registers a listener to the event system.
    default void
    unregisterListener(me.a8kj.eventbus.Listener listener)
    Unregisters a previously registered listener from the event system.
  • Method Details

    • getEventManager

      me.a8kj.eventbus.manager.EventManager getEventManager()
      Retrieves the event manager responsible for handling library-specific events.
      Returns:
      the active EventManager instance.
      Since:
      0.1
    • getConfigRegistry

      ConfigRegistry getConfigRegistry()
      Retrieves the central registry where all configuration files are stored.
      Returns:
      the ConfigRegistry instance.
      Since:
      0.1
    • getConfig

      default ConfigFile<?> getConfig(String key)
      Retrieves a specific configuration file from the registry using its unique key.
      Parameters:
      key - the unique identifier of the configuration.
      Returns:
      the ConfigFile associated with the key.
      Since:
      0.1
    • registerListener

      default void registerListener(me.a8kj.eventbus.Listener listener)
      Registers a listener to the event system.
      Parameters:
      listener - the listener instance to register.
      Throws:
      NullPointerException - if the listener is null.
      Since:
      0.1
    • unregisterListener

      default void unregisterListener(me.a8kj.eventbus.Listener listener)
      Unregisters a previously registered listener from the event system.
      Parameters:
      listener - the listener instance to unregister.
      Throws:
      NullPointerException - if the listener is null.
      Since:
      0.1
    • callEvent

      default void callEvent(me.a8kj.eventbus.Event event)
      Calls an event and dispatches it to all registered listeners.
      Parameters:
      event - the event instance to dispatch.
      Throws:
      NullPointerException - if the event is null.
      Since:
      0.1