getCategory

static Optional<CustomGameRuleCategorygetCategory<T extends GameRules.Rule<T>>(GameRules.Key<T> key)

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