Package com.viaversion.viaversion.api
Interface ViaManager
public interface ViaManager
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addEnableListener
(Runnable runnable) Adds a runnable to be executed when ViaVersion has finished its init before the full server load.void
addPostEnableListener
(Runnable runnable) Adds a runnable to be executed when ViaVersion has finished its init after the full server load.Returns the debug handler.Returns the command handler for managing ViaVersion subcommands.Returns the configuration provider.Returns the userconnection manager for handling clients connected to the server.Returns the injector for injecting netty handlers and initially getting the server protocol version.Returns the platform loader responsible for registering listeners, providers and such.ViaPlatform<?>
Returns platform for handling platform specific configuration, tasks, and plugin data.Returns the protocol manager for registering/getting protocols and their mapping data loading.Returns the manager for Via providers.Returns the async task scheduler.Returns a mutable set of self-added subplatform version strings.default boolean
isDebug()
If debug is enabled, packets and other otherwise suppressed warnings will be logged.boolean
Returns whether the manager has been initialized (and protocols have been loaded).default void
setDebug
(boolean debug) Deprecated.
-
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.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
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
Adds a runnable to be executed when ViaVersion has finished its init before the full server load.- Parameters:
runnable
- runnable to be executed
-
addPostEnableListener
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
-