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 ServerboundCommandSuggestionPacket implements Packet<ServerGamePacketListener> {
    private int id;
    private String command;
    
    public ServerboundCommandSuggestionPacket() {
    }
    
    public ServerboundCommandSuggestionPacket(final int integer, final String string) {
        this.id = integer;
        this.command = string;
    }
    
    @Override
    public void read(final FriendlyByteBuf mg) throws IOException {
        this.id = mg.readVarInt();
        this.command = mg.readUtf(32500);
    }
    
    @Override
    public void write(final FriendlyByteBuf mg) throws IOException {
        mg.writeVarInt(this.id);
        mg.writeUtf(this.command, 32500);
    }
    
    @Override
    public void handle(final ServerGamePacketListener qz) {
        qz.handleCustomCommandSuggestions(this);
    }
    
    public int getId() {
        return this.id;
    }
    
    public String getCommand() {
        return this.command;
    }
}
