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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic SchedulerGets theSchedulerused to schedule async tasks.static ChannelManagerGets theChannelManagerfor creating network channels.static Clientclient()static ConfigManagerGets theConfigManagerused to load and manage configuration files for plugins.static DataManagerGets theDataManagerinstance.static EventManagerGets theEventManagerinstance.static Gamegame()Gets theGameinstance.static booleanstatic booleanstatic MetricsConfigManagerGets theMetricsConfigManagerinstance, allowing data/metric gathering systems to determine whether they have permission to gather server metrics.static Platformplatform()Returns the current platform, or implementation, thisGameis running on.static PluginManagerGets thePluginManagerinstance.static Serverserver()static ServiceProvider.GameScopedGets theGamescopedServiceProviderfor providing services.static SqlManagerGets theSqlManagerfor grabbing sql data sources.static SystemSubjectGets theSystemSubjectinstance from theGameinstance.
-
Constructor Details
-
Sponge
public Sponge()
-
-
Method Details
-
game
Gets theGameinstance. 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, thisGameis running on.- Returns:
- The current implementation
-
dataManager
Gets theDataManagerinstance.- Returns:
- The data manager instance
-
pluginManager
Gets thePluginManagerinstance.- Returns:
- The plugin manager instance
-
eventManager
Gets theEventManagerinstance.- Returns:
- The event manager instance
-
configManager
Gets theConfigManagerused to load and manage configuration files for plugins.- Returns:
- The configuration manager
-
channelManager
Gets theChannelManagerfor 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 theSystemSubjectinstance from theGameinstance.- Returns:
- The system subject
- See Also:
-
metricsConfigManager
Gets theMetricsConfigManagerinstance, allowing data/metric gathering systems to determine whether they have permission to gather server metrics.- Returns:
- The
MetricsConfigManagerinstance
-
asyncScheduler
Gets theSchedulerused to schedule async tasks.- Returns:
- The async scheduler
-
sqlManager
Gets theSqlManagerfor grabbing sql data sources.- Returns:
- The
SqlManagerinstance.
-
serviceProvider
Gets theGamescopedServiceProviderfor providing services.Enginescoped services, if they exist, can be found on the respective engine.- Returns:
- The service provider.
-