package dev.crucifixbeta.api.events.impl;

import dev.crucifixbeta.api.events.Event;
import net.fabricmc.api.EnvType;
import net.fabricmc.api.Environment;
import net.minecraft.entity.player.PlayerEntity;

@Environment(EnvType.CLIENT)
public class TravelEvent extends Event {
   private static final TravelEvent INSTANCE = new TravelEvent();
   private PlayerEntity entity;

   private TravelEvent() {
   }

   public static TravelEvent get(Event.Stage stage, PlayerEntity entity) {
      INSTANCE.entity = entity;
      INSTANCE.stage = stage;
      INSTANCE.setCancelled(false);
      return INSTANCE;
   }

   public PlayerEntity getEntity() {
      return this.entity;
   }
}
