Interface PlayerEvents.TravelToDimension

Enclosing class:
PlayerEvents
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public static interface PlayerEvents.TravelToDimension
A player is about to go to another dimension: by portal, by command, by another mod's teleporter, anything that moves them across. Interrupting keeps them where they are (one standing in a portal isn't asked again for a few seconds). PlayerEvents.CHANGE_DIMENSION follows once they've arrived.
  • Method Summary

    Modifier and Type
    Method
    Description
    onTravelToDimension(net.minecraft.server.level.ServerPlayer player, net.minecraft.resources.ResourceKey<net.minecraft.world.level.Level> from, net.minecraft.resources.ResourceKey<net.minecraft.world.level.Level> to)
     
  • Method Details

    • onTravelToDimension

      EventResult onTravelToDimension(net.minecraft.server.level.ServerPlayer player, net.minecraft.resources.ResourceKey<net.minecraft.world.level.Level> from, net.minecraft.resources.ResourceKey<net.minecraft.world.level.Level> to)