package eu.mhsl.minenet.minigames.instance.transfer;

import eu.mhsl.minenet.minigames.instance.Dimension;
import eu.mhsl.minenet.minigames.instance.MineNetInstance;
import eu.mhsl.minenet.minigames.instance.Spawnable;
import eu.mhsl.minenet.minigames.util.CommonEventHandles;
import net.minestom.server.coordinate.Pos;
import net.minestom.server.event.player.PlayerMoveEvent;
import net.minestom.server.instance.block.Block;

public class Transfer extends MineNetInstance implements Spawnable {
    public Transfer() {
        super(Dimension.THE_END.key);
        eventNode().addListener(PlayerMoveEvent.class, CommonEventHandles::cancel);
        setBlock(0, 0, 0, Block.BARRIER);
    }

    @Override
    public Pos getSpawn() {
        return new Pos(0.5, 1, 0.5);
    }
}