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 ServerboundContainerClosePacket implements Packet<ServerGamePacketListener> {
    private int containerId;
    
    public ServerboundContainerClosePacket() {
    }
    
    public ServerboundContainerClosePacket(final int integer) {
        this.containerId = integer;
    }
    
    @Override
    public void handle(final ServerGamePacketListener pl) {
        pl.handleContainerClose(this);
    }
    
    @Override
    public void read(final FriendlyByteBuf kv) throws IOException {
        this.containerId = kv.readByte();
    }
    
    @Override
    public void write(final FriendlyByteBuf kv) throws IOException {
        kv.writeByte(this.containerId);
    }
}
