public static enum Platform.Type extends Enum<Platform.Type>
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.
Enum Constant and Description |
---|
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.
|
Modifier and Type | Method and Description |
---|---|
boolean |
isClient()
Checks for whether the platform is
CLIENT . |
boolean |
isKnown()
Checks for whether the platform is known.
|
boolean |
isServer()
Checks for whether the platform is
SERVER . |
static Platform.Type |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static Platform.Type[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final Platform.Type CLIENT
public static final Platform.Type SERVER
public static final Platform.Type UNKNOWN
public static Platform.Type[] values()
for (Platform.Type c : Platform.Type.values()) System.out.println(c);
public static Platform.Type valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic boolean isServer()
SERVER
.SERVER
, false otherwisepublic boolean isClient()
CLIENT
.CLIENT
, false otherwisepublic boolean isKnown()
UNKNOWN
, true otherwise