Class TeleportEvent


public class TeleportEvent extends CommonEvent
Fired on the server when a teleport is about to be applied by JourneyMap. Cancellable.
  • Constructor Details

    • TeleportEvent

      public TeleportEvent(@Nullable Waypoint waypoint, net.minecraft.core.BlockPos pos, net.minecraft.resources.ResourceKey<net.minecraft.world.level.Level> fromLevel, net.minecraft.resources.ResourceKey<net.minecraft.world.level.Level> destinationLevel)
    • TeleportEvent

      public TeleportEvent(net.minecraft.core.BlockPos pos, net.minecraft.resources.ResourceKey<net.minecraft.world.level.Level> level)
  • Method Details

    • getWaypoint

      @Nullable public Waypoint getWaypoint()
      This will be null for context menu teleporting on the fullscreen map.
    • getPos

      public net.minecraft.core.BlockPos getPos()
    • getFromLevel

      public net.minecraft.resources.ResourceKey<net.minecraft.world.level.Level> getFromLevel()
    • getDestinationLevel

      public net.minecraft.resources.ResourceKey<net.minecraft.world.level.Level> getDestinationLevel()