Interface GameRuleHolder
-
- All Known Subinterfaces:
ClientWorldProperties
,ServerWorldProperties
,WorldProperties
public interface GameRuleHolder
Represents something that can holdGameRule
s.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description <V> V
gameRule(GameRule<V> gameRule)
Gets the value for the specifiedGameRule
.java.util.Map<GameRule<?>,?>
gameRules()
Gets a map with all theGameRule
s and their values.<V> void
setGameRule(GameRule<V> gameRule, V value)
Sets the value for the specifiedGameRule
.
-
-
-
Method Detail
-
gameRule
<V> V gameRule(GameRule<V> gameRule)
Gets the value for the specifiedGameRule
.- Type Parameters:
V
- The value type- Parameters:
gameRule
- The game rule- Returns:
- The value
-
setGameRule
<V> void setGameRule(GameRule<V> gameRule, V value)
Sets the value for the specifiedGameRule
.- Type Parameters:
V
- The value type- Parameters:
gameRule
- The game rulevalue
- The value
-
-