Package org.spongepowered.api
Enum Class Platform.Type
- All Implemented Interfaces:
Serializable
,Comparable<Platform.Type>
,Constable
- Enclosing interface:
Platform
The type of the platform, or where the game is currently running.
A side is what part of Minecraft this is being run on. The client, or the server. The internal server is also treated like a dedicated server.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
isClient()
Checks for whether the platform isCLIENT
.boolean
isKnown()
Checks for whether the platform is known.boolean
isServer()
Checks for whether the platform isSERVER
.static Platform.Type
Returns the enum constant of this class with the specified name.static Platform.Type[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
CLIENT
The platform of a Minecraft CLIENT is expected. -
SERVER
The platform of a Minecraft SERVER is expected. -
UNKNOWN
It is unknown what platform the game is running on.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
isServer
public boolean isServer()Checks for whether the platform isSERVER
.- Returns:
- True if the platform is
SERVER
, false otherwise
-
isClient
public boolean isClient()Checks for whether the platform isCLIENT
.- Returns:
- True if the platform is
CLIENT
, false otherwise
-
isKnown
public boolean isKnown()Checks for whether the platform is known.- Returns:
- False if the platform is
UNKNOWN
, true otherwise
-