get Category
static Optional<CustomGameRuleCategory> getCategory<T extends GameRules.Rule<T>>(GameRules.Key<T> key)
Content copied to clipboard
Gets the custom category a game rule key is registered to.
Return
the custom category this rule belongs to. Otherwise empty
Parameters
key
the rule key
<T>
the type of value the rule holds
Sources
jvm source
Link copied to clipboard