Interface GameEvent

All Superinterfaces:
net.kyori.adventure.key.Keyed, ProtocolObject, StaticProtocolObject

public sealed interface GameEvent extends StaticProtocolObject
Represents a game event. Used for a wide variety of events, from weather to bed use to game mode to demo messages.
  • Method Details

    • registry

      @Contract(pure=true) @Nullable Registry.GameEventEntry registry()
      Returns the game event registry.
      Specified by:
      registry in interface ProtocolObject
      Returns:
      the game event registry or null if not found
    • values

      @NotNull static @NotNull Collection<@NotNull GameEvent> values()
      Gets the game events from the registry.
      Returns:
      the game events
    • fromKey

      @Nullable static @Nullable GameEvent fromKey(@NotNull @NotNull String key)
      Gets a game event by its namespace ID.
      Parameters:
      key - the namespace ID
      Returns:
      the game event or null if not found
    • fromKey

      @Nullable static @Nullable GameEvent fromKey(@NotNull @NotNull net.kyori.adventure.key.Key key)
      Gets a game event by its namespace ID.
      Parameters:
      key - the event key
      Returns:
      the game event or null if not found