Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## net.minecraft.world
Class GameRules

    java.lang.Object
      net.minecraft.world.GameRules

    public class GameRules

extends Object

Constructor Summary
`GameRules()`

Method Summary
`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.

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### GameRules

    public GameRules()

Method Detail

### addGameRule

    public void addGameRule(String par1Str,
                            String par2Str)

  Define a game rule and its default value.

### setOrCreateGameRule

    public void setOrCreateGameRule(String par1Str,
                                    String par2Str)

### getGameRuleStringValue

    public String getGameRuleStringValue(String par1Str)

  Gets the string Game Rule value.

### getGameRuleBooleanValue

    public boolean getGameRuleBooleanValue(String par1Str)

  Gets the boolean Game Rule value.

### writeGameRulesToNBT

    public NBTTagCompound writeGameRulesToNBT()

  Return the defined game rules as NBT.

### readGameRulesFromNBT

    public void readGameRulesFromNBT(NBTTagCompound par1NBTTagCompound)

  Set defined game rules from NBT.

### getRules

    public String[] getRules()

  Return the defined game rules.

### hasRule

    public boolean hasRule(String par1Str)

  Return whether the specified game rule is defined.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD