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 mg) throws IOException {
        this.id = mg.readVarInt();
    }
    
    @Override
    public void write(final FriendlyByteBuf mg) throws IOException {
        mg.writeVarInt(this.id);
    }
    
    @Override
    public void handle(final ServerGamePacketListener qz) {
        qz.handleAcceptTeleportPacket(this);
    }
    
    public int getId() {
        return this.id;
    }
}
