Package net.minestom.server.game
Interface GameEvent
- All Superinterfaces:
net.kyori.adventure.key.Keyed,ProtocolObject,StaticProtocolObject
Represents a game event.
Used for a wide variety of events, from weather to bed use to game mode to demo messages.
-
Method Summary
Modifier and TypeMethodDescriptionstatic @Nullable GameEventGets a game event by its namespace ID.static @Nullable GameEventfromKey(@NotNull net.kyori.adventure.key.Key key) Gets a game event by its namespace ID.registry()Returns the game event registry.static @NotNull Collection<@NotNull GameEvent> values()Gets the game events from the registry.Methods inherited from interface net.minestom.server.registry.StaticProtocolObject
id, key, name
-
Method Details
-
registry
Returns the game event registry.- Specified by:
registryin interfaceProtocolObject- Returns:
- the game event registry or null if not found
-
values
Gets the game events from the registry.- Returns:
- the game events
-
fromKey
Gets a game event by its namespace ID.- Parameters:
key- the namespace ID- Returns:
- the game event or null if not found
-
fromKey
Gets a game event by its namespace ID.- Parameters:
key- the event key- Returns:
- the game event or null if not found
-