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
    • namespace

      @NotNull @NotNull NamespaceID namespace()
      Gets the namespace ID of this game event.
      Specified by:
      namespace in interface StaticProtocolObject
      Returns:
      the namespace ID
    • values

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

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

      @Nullable static @Nullable GameEvent fromNamespaceId(@NotNull @NotNull NamespaceID namespaceID)
      Gets a game event by its namespace ID.
      Parameters:
      namespaceID - the namespace ID
      Returns:
      the game event or null if not found