Class SessionDefineCustomWaypointsEvent
java.lang.Object
org.geysermc.geyser.api.event.connection.ConnectionEvent
org.geysermc.geyser.api.event.connection.SessionDefineCustomWaypointsEvent
- All Implemented Interfaces:
org.geysermc.event.Event
Called once for every
GeyserConnection to register custom waypoint styles. Custom waypoint styles must be registered through this event.
CustomWaypointStyles may be registered multiple times for different Java Edition waypoint style Identifiers, however, each Java Edition waypoint style
may only have one CustomWaypointStyle.
- Since:
- 2.11.0
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract Map<Identifier, CustomWaypointStyle> Returns a map of all the currently registered custom waypoint styles for thisGeyserConnection.abstract voidregister(Identifier identifier, CustomWaypointStyle style) Registers aCustomWaypointStylefor thisGeyserConnection, for the given Java Edition waypoint styleidentifier.Methods inherited from class org.geysermc.geyser.api.event.connection.ConnectionEvent
connection
-
Constructor Details
-
SessionDefineCustomWaypointsEvent
-
-
Method Details
-
customWaypointStyles
Returns a map of all the currently registered custom waypoint styles for thisGeyserConnection.- Returns:
- an unmodifiable map of all currently registered custom waypoint styles
- Since:
- 2.11.0
-
register
Registers aCustomWaypointStylefor thisGeyserConnection, for the given Java Edition waypoint styleidentifier.The given
CustomWaypointStylewill be used for every waypoint that uses the givenidentifieras waypoint style. Vanilla waypoint styles, likeminecraft:default, may be overridden.When a waypoint style is already registered for the given
identifier, this method will fail without throwing an exception, but an error will be logged.- Parameters:
identifier- the identifier of the waypoint style on Java Editionstyle- theCustomWaypointStyle- Throws:
CustomWaypointStyleRegisterException- when an error occurred while registering the custom waypoint style- Since:
- 2.11.0
-