/** * Returns the current platform, or implementation, this {@link Game} * is running on. * * @return The current implementation */ public static Platform getPlatform() { return check(platform); }
/** * Gets the {@link ChannelRegistrar} for creating network channels. * * @return The channel registrar */ public static ChannelRegistrar getChannelRegistrar() { return check(channelRegistrar); }
/** * Gets the {@link DataManager} instance. * * @return The data manager instance */ public static DataManager getDataManager() { return check(dataManager); }
/** * Gets the game's instance of the service manager, which is the gateway * to various services provided by Sponge (command registration and so on). * * <p>Services registered by other plugins may be available too.</p> * * @return The service manager */ public static ServiceManager getServiceManager() { return check(serviceManager); }
/** * Gets the {@link ConfigManager} used to load and manage configuration files * for plugins. * * @return The configuration manager */ public static ConfigManager getConfigManager() { return check(configManager); }
/** * Gets the {@link TeleportHelper}, used to find safe {@link Location}s. * * @return The teleport helper */ public static TeleportHelper getTeleportHelper() { return check(teleportHelper); }
/** * Gets the {@link MetricsConfigManager} instance, allowing data/metric gathering * systems to determine whether they have permission to gather server * metrics. * * @return The {@link MetricsConfigManager} instance */ public static MetricsConfigManager getMetricsConfigManager() { return check(metricsConfigManager); }
/** * Gets the {@link Game} instance. There is ever only going * to be a single game instance at any given time, except during * the various extraneous {@link GameState}s that the game instance * is otherwise unavailable. * * @return The game instance */ public static Game getGame() { return check(game); }
/** * Gets the {@link GameRegistry} instance. * * @return The game registry instance */ public static GameRegistry getRegistry() { return check(registry); }
/** * Gets the {@link EventManager} instance. * * @return The event manager instance */ public static EventManager getEventManager() { return check(eventManager); }
/** * Gets the scheduler used to schedule tasks. * * @return The scheduler */ public static Scheduler getScheduler() { return check(scheduler); }
/** * Gets the {@link PropertyRegistry} instance to register * {@link PropertyStore}s. * * @return The property registry */ public static PropertyRegistry getPropertyRegistry() { return check(propertyRegistry); }
/** * Gets the {@link PluginManager} instance. * * @return The plugin manager instance */ public static PluginManager getPluginManager() { return check(pluginManager); }
/** * Gets the {@link AssetManager} instance. * * @return The asset manager instance */ public static AssetManager getAssetManager() { return check(assetManager); }
/** * Gets the {@link CommandManager} instance. * * @return The command manager instance */ public static CommandManager getCommandManager() { return check(commandManager); }
/** * Gets the {@link CauseStackManager} instance from the * {@link Game} instance. * * @see Game#getCauseStackManager() * @return The cause stack manager instance */ public static CauseStackManager getCauseStackManager() { return check(causeStackManager); }