public enum GameMode extends Enum<GameMode>
If you need more help, take a look at Wiki
Enum Constant and Description |
---|
ADVENTURE |
CREATIVE |
HARDCORE |
SPECTATE |
SURVIVAL |
Modifier and Type | Method and Description |
---|---|
byte |
asByte()
Returns the
byte value of the GameMode |
static byte |
asByte(GameMode gameMode)
Returns the
byte value of the GameMode |
static GameMode |
of(int i) |
static GameMode |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static GameMode[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static GameMode[] values()
for (GameMode c : GameMode.values()) System.out.println(c);
public static GameMode 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 static byte asByte(GameMode gameMode)
byte
value of the GameModegameMode
- GameModebyte
value of the GameModepublic byte asByte()
byte
value of the GameModebyte
value of the GameModeCopyright © 2016. All rights reserved.