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 Classes
    Modifier and Type
    Interface
    Description
    static final record 
     
    static final record 
     
  • Method Summary

    Modifier and Type
    Method
    Description
    The TypeAdapter used for this gamerule
    The category of this gamerule
    default value for the gamerule
    net.kyori.adventure.key.Key
    key()
    The id of the gamerule; without the minecraft namespace
    org.geysermc.cumulus.component.Component
    toComponent(GeyserSession session, String currentValue)
     
    boolean
    validate(T value)
    ensures 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()
      The TypeAdapter used for this gamerule
    • defaultValue

      T defaultValue()
      default value for the gamerule
    • validate

      boolean validate(T value)
      ensures gamerule values are within range
    • toComponent

      org.geysermc.cumulus.component.Component toComponent(GeyserSession session, String currentValue)