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 GameEvent
fromNamespaceId
(@NotNull String namespaceID) Gets a game event by its namespace ID.static @Nullable GameEvent
fromNamespaceId
(@NotNull NamespaceID namespaceID) Gets a game event by its namespace ID.@NotNull NamespaceID
Gets the namespace ID of this game event.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:
registry
in interfaceProtocolObject
- Returns:
- the game event registry or null if not found
-
namespace
Gets the namespace ID of this game event.- Specified by:
namespace
in interfaceStaticProtocolObject
- Returns:
- the namespace ID
-
values
Gets the game events from the registry.- Returns:
- the game events
-
fromNamespaceId
Gets a game event by its namespace ID.- Parameters:
namespaceID
- the namespace ID- Returns:
- the game event or null if not found
-
fromNamespaceId
Gets a game event by its namespace ID.- Parameters:
namespaceID
- the namespace ID- Returns:
- the game event or null if not found
-