public class GameRules extends Object
Constructor and Description |
---|
GameRules() |
Modifier and Type | Method and Description |
---|---|
void |
addGameRule(String par1Str,
String par2Str)
Define a game rule and its default value.
|
boolean |
getGameRuleBooleanValue(String par1Str)
Gets the boolean Game Rule value.
|
String |
getGameRuleStringValue(String par1Str)
Gets the string Game Rule value.
|
String[] |
getRules()
Return the defined game rules.
|
boolean |
hasRule(String par1Str)
Return whether the specified game rule is defined.
|
void |
readGameRulesFromNBT(NBTTagCompound par1NBTTagCompound)
Set defined game rules from NBT.
|
void |
setOrCreateGameRule(String par1Str,
String par2Str) |
NBTTagCompound |
writeGameRulesToNBT()
Return the defined game rules as NBT.
|
public void addGameRule(String par1Str, String par2Str)
public String getGameRuleStringValue(String par1Str)
public boolean getGameRuleBooleanValue(String par1Str)
public NBTTagCompound writeGameRulesToNBT()
public void readGameRulesFromNBT(NBTTagCompound par1NBTTagCompound)
public String[] getRules()
public boolean hasRule(String par1Str)