Package org.spongepowered.api
Class Sponge
java.lang.Object
org.spongepowered.api.Sponge
A static all access class granting static access to various systems
for the API.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic Scheduler
Gets theScheduler
used to schedule async tasks.static ChannelManager
Gets theChannelManager
for creating network channels.static Client
client()
static ConfigManager
Gets theConfigManager
used to load and manage configuration files for plugins.static DataManager
Gets theDataManager
instance.static EventManager
Gets theEventManager
instance.static Game
game()
Gets theGame
instance.static boolean
static boolean
static MetricsConfigManager
Gets theMetricsConfigManager
instance, allowing data/metric gathering systems to determine whether they have permission to gather server metrics.static Platform
platform()
Returns the current platform, or implementation, thisGame
is running on.static PluginManager
Gets thePluginManager
instance.static Server
server()
static ServiceProvider.GameScoped
Gets theGame
scopedServiceProvider
for providing services.static SqlManager
Gets theSqlManager
for grabbing sql data sources.static SystemSubject
Gets theSystemSubject
instance from theGame
instance.
-
Constructor Details
-
Sponge
public Sponge()
-
-
Method Details
-
game
Gets theGame
instance. There is ever only going to be a single game instance at any given time.- Returns:
- The game instance
-
platform
Returns the current platform, or implementation, thisGame
is running on.- Returns:
- The current implementation
-
dataManager
Gets theDataManager
instance.- Returns:
- The data manager instance
-
pluginManager
Gets thePluginManager
instance.- Returns:
- The plugin manager instance
-
eventManager
Gets theEventManager
instance.- Returns:
- The event manager instance
-
configManager
Gets theConfigManager
used to load and manage configuration files for plugins.- Returns:
- The configuration manager
-
channelManager
Gets theChannelManager
for creating network channels.- Returns:
- The channel registry
-
isServerAvailable
public static boolean isServerAvailable()- Returns:
- True if the server instance is available
- See Also:
-
server
- Returns:
- The server instance
- See Also:
-
isClientAvailable
public static boolean isClientAvailable()- Returns:
- True if the client instance is available
- See Also:
-
client
- Returns:
- The client instance
- See Also:
-
systemSubject
Gets theSystemSubject
instance from theGame
instance.- Returns:
- The system subject
- See Also:
-
metricsConfigManager
Gets theMetricsConfigManager
instance, allowing data/metric gathering systems to determine whether they have permission to gather server metrics.- Returns:
- The
MetricsConfigManager
instance
-
asyncScheduler
Gets theScheduler
used to schedule async tasks.- Returns:
- The async scheduler
-
sqlManager
Gets theSqlManager
for grabbing sql data sources.- Returns:
- The
SqlManager
instance.
-
serviceProvider
Gets theGame
scopedServiceProvider
for providing services.Engine
scoped services, if they exist, can be found on the respective engine.- Returns:
- The service provider.
-