register
Registers a GameRules.Rule.
Return
a rule key which can be used to query the value of the rule
Parameters
name
the name of the rule
category
the category of this rule
type
the rule type
<T>
the type of rule
Throws
if a rule of the same name already exists
static GameRules.Key<T> register<T extends GameRules.Rule<T>>(String name, CustomGameRuleCategory category, GameRules.Type<T> type)
Content copied to clipboard
Registers a GameRules.Rule with a custom category.
Return
a rule key which can be used to query the value of the rule
Parameters
name
the name of the rule
category
the category of this rule
type
the rule type
<T>
the type of rule
Throws
if a rule of the same name already exists