Enum Class MinecraftSide
- All Implemented Interfaces:
Serializable, Comparable<MinecraftSide>, Constable
Defines the side where a mod is intended to run.
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionstatic MinecraftSidefromString(String value) Creates a Minecraft side from its string representation.static MinecraftSideReturns the enum constant of this class with the specified name.static MinecraftSide[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
CLIENT
Mod runs only on the client side. -
SERVER
Mod runs only on the server side. -
COMMON
Mod runs on both client and server sides.
-
-
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
-
fromString
Creates a Minecraft side from its string representation.The value is converted to uppercase using the root locale before being converted to the corresponding enum constant.
- Parameters:
value- the string representation of the Minecraft side- Returns:
- the corresponding MinecraftSide enum value
- Throws:
IllegalArgumentException- if the value does not match any enum constant
-