public Protocol(Class<? extends PacketHandler> handlerClass){
        this.packets = registerPackets();
        this.handlerClass = handlerClass;

        for(Class<? extends  Packet> type : packets.values()){
            PacketInfo annotation = type.getAnnotation(PacketInfo.class);
            packetInfos.put(type, new PacketInfos(type, annotation.id(), annotation.receivable(), annotation.response()));
        }
    }