public class GameRules
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
GameRules.ValueType |
Constructor and Description |
---|
GameRules() |
Modifier and Type | Method and Description |
---|---|
void |
addGameRule(java.lang.String key,
java.lang.String value,
GameRules.ValueType type) |
boolean |
areSameType(java.lang.String key,
GameRules.ValueType otherValue) |
boolean |
getBoolean(java.lang.String name) |
int |
getInt(java.lang.String name) |
java.lang.String[] |
getRules() |
java.lang.String |
getString(java.lang.String name) |
boolean |
hasRule(java.lang.String name) |
void |
readFromNBT(NBTTagCompound nbt) |
void |
setOrCreateGameRule(java.lang.String key,
java.lang.String ruleValue) |
NBTTagCompound |
writeToNBT() |
public void addGameRule(java.lang.String key, java.lang.String value, GameRules.ValueType type)
public void setOrCreateGameRule(java.lang.String key, java.lang.String ruleValue)
public java.lang.String getString(java.lang.String name)
public boolean getBoolean(java.lang.String name)
public int getInt(java.lang.String name)
public NBTTagCompound writeToNBT()
public void readFromNBT(NBTTagCompound nbt)
public java.lang.String[] getRules()
public boolean hasRule(java.lang.String name)
public boolean areSameType(java.lang.String key, GameRules.ValueType otherValue)