public enum GameMode extends Enum<GameMode>
HumanEntity
s may
have列挙型定数と説明 |
---|
ADVENTURE
Adventure mode cannot break blocks without the correct tools.
|
CREATIVE
Creative mode may fly, build instantly, become invulnerable and create
free items.
|
SPECTATOR
Spectator mode cannot interact with the world in anyway and is
invisible to normal players.
|
SURVIVAL
Survival mode is the "normal" gameplay type, with no special features.
|
修飾子とタイプ | メソッドと説明 |
---|---|
static GameMode |
getByValue(int value)
非推奨です。
Magic value
|
int |
getValue()
非推奨です。
Magic value
|
static GameMode |
valueOf(String name)
指定した名前を持つこの型の列挙型定数を返します。
|
static GameMode[] |
values()
この列挙型の定数を含む配列を宣言されている順序で返します。
|
public static final GameMode CREATIVE
public static final GameMode SURVIVAL
public static final GameMode ADVENTURE
public static final GameMode SPECTATOR
public static GameMode[] values()
for(GameMode c: GameMode.values()) System.out.println(c);
public static GameMode valueOf(String name)
name
- 返される列挙型定数の名前。IllegalArgumentException
- この列挙型に、指定した名前の定数がない場合NullPointerException
- 引数がnullの場合@Deprecated public int getValue()
@Deprecated public static GameMode getByValue(int value)
value
- Value to checkGameMode
with the given value, or null if
it doesn't existCopyright © 2016. All rights reserved.