public final class Sponge extends Object
| Constructor and Description |
|---|
Sponge() |
| Modifier and Type | Method and Description |
|---|---|
static AssetManager |
getAssetManager()
Gets the
AssetManager instance. |
static CauseStackManager |
getCauseStackManager()
Gets the
CauseStackManager instance from the
Game instance. |
static ChannelRegistrar |
getChannelRegistrar()
Gets the
ChannelRegistrar for creating network channels. |
static CommandManager |
getCommandManager()
Gets the
CommandManager instance. |
static ConfigManager |
getConfigManager()
Gets the
ConfigManager used to load and manage configuration files
for plugins. |
static DataManager |
getDataManager()
Gets the
DataManager instance. |
static Optional<GameDictionary> |
getDictionary()
Gets the
GameDictionary instance from the
Game instance. |
static EventManager |
getEventManager()
Gets the
EventManager instance. |
static Game |
getGame()
Gets the
Game instance. |
static MetricsConfigManager |
getMetricsConfigManager()
Gets the
MetricsConfigManager instance, allowing data/metric gathering
systems to determine whether they have permission to gather server
metrics. |
static Platform |
getPlatform()
Returns the current platform, or implementation, this
Game
is running on. |
static PluginManager |
getPluginManager()
Gets the
PluginManager instance. |
static PropertyRegistry |
getPropertyRegistry()
Gets the
PropertyRegistry instance to register
PropertyStores. |
static GameRegistry |
getRegistry()
Gets the
GameRegistry instance. |
static Scheduler |
getScheduler()
Gets the scheduler used to schedule tasks.
|
static Server |
getServer()
|
static ServiceManager |
getServiceManager()
Gets the game's instance of the service manager, which is the gateway
to various services provided by Sponge (command registration and so on).
|
static TeleportHelper |
getTeleportHelper()
Gets the
TeleportHelper, used to find safe Locations. |
static boolean |
isServerAvailable()
Gets whether a
Server instance is available without throwing an
exception from calling getServer(). |
public static Game getGame()
Game instance. There is ever only going
to be a single game instance at any given time, except during
the various extraneous GameStates that the game instance
is otherwise unavailable.public static Platform getPlatform()
Game
is running on.public static GameRegistry getRegistry()
GameRegistry instance.public static DataManager getDataManager()
DataManager instance.public static PropertyRegistry getPropertyRegistry()
PropertyRegistry instance to register
PropertyStores.public static PluginManager getPluginManager()
PluginManager instance.public static EventManager getEventManager()
EventManager instance.public static AssetManager getAssetManager()
AssetManager instance.public static ConfigManager getConfigManager()
ConfigManager used to load and manage configuration files
for plugins.public static CommandManager getCommandManager()
CommandManager instance.public static ServiceManager getServiceManager()
Services registered by other plugins may be available too.
public static Scheduler getScheduler()
public static ChannelRegistrar getChannelRegistrar()
ChannelRegistrar for creating network channels.public static TeleportHelper getTeleportHelper()
TeleportHelper, used to find safe Locations.public static boolean isServerAvailable()
Server instance is available without throwing an
exception from calling getServer().Game.isServerAvailable()public static Server getServer()
Server instance from the
Game instance.
Note: During various GameStates, a Server instance
may NOT be available. During these specific states,
calling Game.getServer() will throw an exception. To double
check, call isServerAvailable()
Game.getServer(),
Game.isServerAvailable()public static Optional<GameDictionary> getDictionary()
GameDictionary instance from the
Game instance.Game.getGameDictionary()public static CauseStackManager getCauseStackManager()
CauseStackManager instance from the
Game instance.Game.getCauseStackManager()public static MetricsConfigManager getMetricsConfigManager()
MetricsConfigManager instance, allowing data/metric gathering
systems to determine whether they have permission to gather server
metrics.MetricsConfigManager instance