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 ServerboundSelectTradePacket implements Packet<ServerGamePacketListener> {
    private int item;
    
    public ServerboundSelectTradePacket() {
    }
    
    public ServerboundSelectTradePacket(final int integer) {
        this.item = integer;
    }
    
    @Override
    public void read(final FriendlyByteBuf mg) throws IOException {
        this.item = mg.readVarInt();
    }
    
    @Override
    public void write(final FriendlyByteBuf mg) throws IOException {
        mg.writeVarInt(this.item);
    }
    
    @Override
    public void handle(final ServerGamePacketListener qz) {
        qz.handleSelectTrade(this);
    }
    
    public int getItem() {
        return this.item;
    }
}
