Class DeathWaypointEvent
java.lang.Object
journeymap.api.v2.common.event.impl.JourneyMapEvent
journeymap.api.v2.common.event.impl.CommonEvent
journeymap.api.v2.common.event.common.DeathWaypointEvent
Fired before a death waypoint is created, both client-side (singleplayer or
non-JM-managed servers) and server-side (JourneyMap-managed servers).
Cancelling the event prevents the death waypoint from being created.
The plain WaypointEvent with WaypointEvent.Context.CREATE
is suppressed for death waypoints so addons subscribing to either receive
exactly one notification per death.
-
Nested Class Summary
Nested classes/interfaces inherited from class CommonEvent
CommonEvent.Side -
Field Summary
Fields inherited from class JourneyMapEvent
timestamp -
Constructor Summary
ConstructorsConstructorDescriptionDeathWaypointEvent(Waypoint waypoint, net.minecraft.core.BlockPos location, net.minecraft.resources.ResourceKey<net.minecraft.world.level.Level> dimension, CommonEvent.Side side) -
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.resources.ResourceKey<net.minecraft.world.level.Level> net.minecraft.core.BlockPosThe death waypoint being created.toString()Methods inherited from class CommonEvent
getSideMethods inherited from class JourneyMapEvent
cancel, isCancellable, isCancelled
-
Constructor Details
-
DeathWaypointEvent
public DeathWaypointEvent(Waypoint waypoint, net.minecraft.core.BlockPos location, net.minecraft.resources.ResourceKey<net.minecraft.world.level.Level> dimension, CommonEvent.Side side)
-
-
Method Details
-
getWaypoint
The death waypoint being created. Mutating fields on it before the event returns will be reflected in the persisted waypoint (if not cancelled). -
getLocation
public net.minecraft.core.BlockPos getLocation() -
getDimension
public net.minecraft.resources.ResourceKey<net.minecraft.world.level.Level> getDimension() -
toString
-