Interface ViaManager


public interface ViaManager
  • Method Details

    • getProtocolManager

      ProtocolManager getProtocolManager()
      Returns the protocol manager for registering/getting protocols and their mapping data loading.
      Returns:
      protocol manager
    • getPlatform

      ViaPlatform<?> getPlatform()
      Returns platform for handling platform specific configuration, tasks, and plugin data.
      Returns:
      platform
    • getConnectionManager

      ConnectionManager getConnectionManager()
      Returns the userconnection manager for handling clients connected to the server.
      Returns:
      userconnection manager
    • getProviders

      ViaProviders getProviders()
      Returns the manager for Via providers.
      Returns:
      provider manager
    • getInjector

      ViaInjector getInjector()
      Returns the injector for injecting netty handlers and initially getting the server protocol version.
      Returns:
      injector
    • getCommandHandler

      ViaVersionCommand getCommandHandler()
      Returns the command handler for managing ViaVersion subcommands.
      Returns:
      command handler
    • getLoader

      ViaPlatformLoader getLoader()
      Returns the platform loader responsible for registering listeners, providers and such.
      Returns:
      platform loader
    • getScheduler

      Scheduler getScheduler()
      Returns the async task scheduler.
      Returns:
      async task scheduler
    • getConfigurationProvider

      ConfigurationProvider getConfigurationProvider()
      Returns the configuration provider.
      Returns:
      the configuration provider
    • isDebug

      default boolean isDebug()
      If debug is enabled, packets and other otherwise suppressed warnings will be logged.
      Returns:
      true if enabled
    • setDebug

      @Deprecated default void setDebug(boolean debug)
      Deprecated.
      Sets the debug mode. If enabled, packets and other otherwise suppressed warnings will be logged.
      Parameters:
      debug - whether debug should be enabled
    • debugHandler

      DebugHandler debugHandler()
      Returns the debug handler.
      Returns:
      debug handler
    • getSubPlatforms

      Set<String> getSubPlatforms()
      Returns a mutable set of self-added subplatform version strings. This set is expanded by the subplatform itself (e.g. ViaBackwards), and may not contain all running ones.
      Returns:
      mutable set of subplatform versions
    • addEnableListener

      void addEnableListener(Runnable runnable)
      Adds a runnable to be executed when ViaVersion has finished its init before the full server load.
      Parameters:
      runnable - runnable to be executed
    • addPostEnableListener

      void addPostEnableListener(Runnable runnable)
      Adds a runnable to be executed when ViaVersion has finished its init after the full server load.
      Parameters:
      runnable - runnable to be executed
    • isInitialized

      boolean isInitialized()
      Returns whether the manager has been initialized (and protocols have been loaded).
      Returns:
      whether the manager has been initialized