Interface GameRule<T>
- All Known Implementing Classes:
GameRule.Bool,GameRule.Int
public interface GameRule<T>
GameRule types, used in the gamerule menu
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final recordstatic final record -
Method Summary
Modifier and TypeMethodDescriptionadapter()TheTypeAdapterused for this gamerulecategory()The category of this gameruledefault value for the gamerulenet.kyori.adventure.key.Keykey()The id of the gamerule; without the minecraft namespaceorg.geysermc.cumulus.component.ComponenttoComponent(GeyserSession session, String currentValue) booleanensures gamerule values are within range
-
Method Details
-
key
net.kyori.adventure.key.Key key()The id of the gamerule; without the minecraft namespace -
category
GameRuleCategory category()The category of this gamerule -
adapter
TypeAdapter<T> adapter()TheTypeAdapterused for this gamerule -
defaultValue
T defaultValue()default value for the gamerule -
validate
ensures gamerule values are within range -
toComponent
-