package net.minecraft.network.protocol.game;

import net.minecraft.network.PacketListener;
import java.io.IOException;
import net.minecraft.network.FriendlyByteBuf;
import net.minecraft.network.protocol.Packet;

public class ServerboundAcceptTeleportationPacket implements Packet<ServerGamePacketListener> {
    private int id;
    
    public ServerboundAcceptTeleportationPacket() {
    }
    
    public ServerboundAcceptTeleportationPacket(final int integer) {
        this.id = integer;
    }
    
    @Override
    public void read(final FriendlyByteBuf kv) throws IOException {
        this.id = kv.readVarInt();
    }
    
    @Override
    public void write(final FriendlyByteBuf kv) throws IOException {
        kv.writeVarInt(this.id);
    }
    
    @Override
    public void handle(final ServerGamePacketListener pl) {
        pl.handleAcceptTeleportPacket(this);
    }
    
    public int getId() {
        return this.id;
    }
}
