Contents
Class EnterInstanceTeleporterEvent
java.lang.Object
com.hypixel.hytale.component.system.EcsEvent
com.hypixel.hytale.builtin.instances.event.EnterInstanceTeleporterEvent
Fired when a player uses a teleporter to enter an instance.
Block teleporters dispatch this event on the block entity.
Teleporters with an instance key dispatch this event through the entity store.
The destination world may still be loading when the event is fired.
-
Constructor Summary
ConstructorsConstructorDescriptionEnterInstanceTeleporterEvent(InteractionContext context, CompletableFuture<World> destination) -
Method Summary
Modifier and TypeMethodDescriptioncontext()The interaction context associated with the event.Returns the future for the destination world, which may still be loading.static EnterInstanceTeleporterEventof(InteractionContext context, World world, CompletableFuture<World> worldFuture) Creates an event from a destination world or a future for that world.
-
Constructor Details
-
EnterInstanceTeleporterEvent
public EnterInstanceTeleporterEvent(@Nonnull InteractionContext context, @Nonnull CompletableFuture<World> destination)
-
-
Method Details
-
context
The interaction context associated with the event.- Returns:
- the interaction context of the event
-
destination
Returns the future for the destination world, which may still be loading.- Returns:
- the future for the teleport destination world
-
of
public static EnterInstanceTeleporterEvent of(@Nonnull InteractionContext context, @Nullable World world, @Nullable CompletableFuture<World> worldFuture) Creates an event from a destination world or a future for that world. Ifworldis supplied, it takes precedence overworldFuture. Otherwise, the event usesworldFutureif supplied. If both arenull, the completed future containsnull.- Parameters:
context- the interaction context of the eventworld- the destination world, ornullif unavailableworldFuture- the future used whenworldisnull, ornullif unavailable- Returns:
- the event with the selected destination future
-