Package org.spongepowered.api
Interface Platform
public interface Platform
Represents a possible platform or implementation a
Game
could be
running on.-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic enum
Represents a part of thePlatform
.static enum
The type of the platform, or where the game is currently running. -
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionasMap()
Returns this platform instance, as a key-value map.org.spongepowered.plugin.PluginContainer
container
(Platform.Component component) Returns thePluginContainer
for the specified platformPlatform.Component
.Retrieves the currentPlatform.Type
the platform is executing on.Gets the current Minecraft version of this platform.type()
Retrieves the currentPlatform.Type
this platform is running on.
-
Field Details
-
API_ID
- See Also:
-
-
Method Details
-
type
Platform.Type type()Retrieves the currentPlatform.Type
this platform is running on.- Returns:
- The current type
-
executionType
Platform.Type executionType()Retrieves the currentPlatform.Type
the platform is executing on.- Returns:
- The execution type
-
container
Returns thePluginContainer
for the specified platformPlatform.Component
.- Parameters:
component
- The platform component- Returns:
- The plugin container for the component
-
minecraftVersion
MinecraftVersion minecraftVersion()Gets the current Minecraft version of this platform.- Returns:
- The Minecraft version
-
asMap
Returns this platform instance, as a key-value map.This mechanism allows for platform-specific information like Forge version.
- Returns:
- This platform as a map
-