@Immutable public static class GameRule.Value extends Object
| Modifier and Type | Method and Description |
|---|---|
boolean |
asBoolean()
Obtains the boolean value
|
int |
asInt()
Obtains the integer value
|
boolean |
isBoolean()
Checks to see whether this value is a boolean
|
boolean |
isInteger()
Checks to see whether this value is an integer
|
static GameRule.Value |
of(boolean bool)
Creates a new game rule value that takes a boolean parameter
|
static GameRule.Value |
of(int integer)
Creates a new game rule value that takes an integer parameter
|
public static GameRule.Value of(int integer)
integer - the game rule parameterpublic static GameRule.Value of(boolean bool)
bool - the game rule parameterpublic boolean isInteger()
true if it is an integer, false if it is a booleanpublic boolean isBoolean()
true if it is a boolean, false if it is an integerpublic boolean asBoolean()
public int asInt()
Copyright © 2016. All rights reserved.