Package journeymap.api.v2.client.event
Class MappingEvent
java.lang.Object
journeymap.api.v2.common.event.impl.JourneyMapEvent
journeymap.api.v2.common.event.impl.ClientEvent
journeymap.api.v2.client.event.MappingEvent
This event fires when mapping starts or stops.
WorldId can be set when mapping starts.
This event is not cancellable.
-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from class journeymap.api.v2.common.event.impl.ClientEvent
dimensionFields inherited from class journeymap.api.v2.common.event.impl.JourneyMapEvent
timestamp -
Constructor Summary
ConstructorsConstructorDescriptionMappingEvent(MappingEvent.Stage stage, net.minecraft.resources.ResourceKey<net.minecraft.world.level.Level> dimension, String worldId) -
Method Summary
Modifier and TypeMethodDescriptiongetStage()Gets the current mapping stage.@Nullable StringGets the worldId for the current world.voidsetWorldId(@Nullable String worldId) Sets the world id when mapping starts.Methods inherited from class journeymap.api.v2.common.event.impl.JourneyMapEvent
cancel, isCancellable, isCancelled
-
Constructor Details
-
MappingEvent
public MappingEvent(MappingEvent.Stage stage, net.minecraft.resources.ResourceKey<net.minecraft.world.level.Level> dimension, String worldId)
-
-
Method Details
-
getStage
Gets the current mapping stage.- Returns:
- - The stage
-
getWorldId
Gets the worldId for the current world. Will return null if no worldId has been set.- Returns:
- worldId.
-
setWorldId
Sets the world id when mapping starts. This can only be set on the mapping started stage.- Parameters:
worldId- - the new worldId
-